Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
Message from discussion get most recent filename
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Timo Salmi  
View profile  
 More options Aug 29 2002, 2:43 am
Newsgroups: alt.msdos.batch
From: t...@UWasa.Fi (Timo Salmi)
Date: 29 Aug 2002 09:27:23 +0300
Local: Thurs, Aug 29 2002 2:27 am
Subject: Re: get most recent filename

Larry__Weiss  <l...@airmail.net> wrote:
> Timo Salmi wrote:
> >   dir /o-d /b|gawk 'NR==1{printf"@set file_=%%s\n",$1}'>>tmp$$$.bat
> It's really too bad that GAWK isn't a standard part of the MSDOS batch
> tools.   As your example shows, GAWK enables some very simple solutions
> to frequently needed batch scripting challenges.

Yes. For exactly this practical reason I have added two
Unix-originating tools, awk and sed, to my regular MS-DOS commands
arsenal, my batch FAQ inclusive. What I particularly like about
these two is that they do not interfere with the original platform.
Also, they sometimes much enhance portability from Unix ideas if a
solution already happens to be available on that side.

QBASIC, which can more legitimately be considered part of the
original MS-DOS, is also a tool that can be used to solve many, even
tricky MS-DOS batch problems. But not nearly as conveniently as
especially gawk.

On the other hand, if one is just interested in the pure art of
batch programming, producing batches with strictly the original set
becomes an interesting challenge. Benny Pedersen, in particular, has
put much nice effort in presenting such batch solutions.

> Since GAWK is free and very widely available, I welcome solutions that
> use it.   A large part of my personal batch script collection uses it.

For those who do not have the links, e.g. the ones I use:

 233923 Mar 25 1995 ftp://garbo.uwasa.fi/pc/unix/gawk2156.zip
 gawk2156.zip GNU awk text scanning and processing language

 20368 Oct 1 1991 ftp://garbo.uwasa.fi/pc/unix/sed15x.zip
 sed15x.zip HHSED executable, E.Raymond+D.Kirschbaum+H.Helman

   All the best, Timo

--
Prof. Timo Salmi ftp & http://garbo.uwasa.fi/ archives 193.166.120.5
Department of Accounting and Business Finance  ; University of Vaasa
mailto:t...@uwasa.fi <http://www.uwasa.fi/~ts/>  ; FIN-65101,  Finland
Useful batch files and tricks ftp://garbo.uwasa.fi/pc/link/tsbat.zip


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.