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: Yes. For exactly this practical reason I have added two > 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. 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 On the other hand, if one is just interested in the pure art of > Since GAWK is free and very widely available, I welcome solutions that For those who do not have the links, e.g. the ones I use: > use it. A large part of my personal batch script collection uses it. 233923 Mar 25 1995 ftp://garbo.uwasa.fi/pc/unix/gawk2156.zip 20368 Oct 1 1991 ftp://garbo.uwasa.fi/pc/unix/sed15x.zip All the best, Timo -- 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.
| ||||||||||||||