version problem in bash

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Nathan England
Date:  
New-Topics: Python guru needed
Subject: version problem in bash
=2D----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Am Donnerstag 23 Oktober 2003 12:36 nachmittags/abends schrieb Jeremy C. Re=
ed:

A bit more complicated than my 'ls | tail -n1' , but it works as well. lol
And yours works with variables as well.

Thanks

nathan

> On Thu, 23 Oct 2003, Nathan England wrote:
> > But I've also added smaller things, so I made smaller revisions using 1=

=2E1
> > and 1.2 upto 1.9 then going to 2.0
> >
> > Well, my problem is, now I'm up to 4.1.4 and I want to use a script to
> > grab the newest file, grep something out of it, and exit. I want to know
> > the fastest way for bash to figure out the newest version (biggest
> > number?) and use that one.
>
> The built-in test can check for newer files and can compare if a string
> sorts after another string ("lexicographically in the current locale").
>
> Maybe something like:
>
> big=3D"" ; for fn in * ; do [ "$fn" \> "$big" ] && big=3D"$fn" ; done ; e=

cho
> $big
>
>
>    Jeremy C. Reed
>    http://www.reedmedia.net/

>
> ---------------------------------------------------
> PLUG-discuss mailing list -
> To subscribe, unsubscribe, or to change you mail settings:
> http://lists.PLUG.phoenix.az.us/mailman/listinfo/plug-discuss


=2D --=20

Nathan England

Arcanum Linux !
nathan at the-arcanum.org
jabber id:

"A free society is one where it is safe to be unpopular."
=2D --Adlai Stevenson


Registered Linux User #189789, Machine #106603
www.sincerechoice.org


Todays Fortune:

"You are old," said the youth, "one would hardly suppose
    That your eye was as steady as ever;
Yet you balanced an eel on the end of your nose --
    What made you so awfully clever?"


"I have answered three questions, and that is enough,"
    Said his father.  "Don't give yourself airs!
Do you think I can listen all day to such stuff?
    Be off, or I'll kick you down stairs!"
        -- Lewis Carrol
=2D----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)


iD8DBQE/mC4KnIZkEnRTrK0RAhdSAJ9snxmOQkiswbtmw9NglmIdyF+6UwCfbEN7
oo5Bf3RFb8aN4XhVTUQnLi4=3D
=3DTgNA
=2D----END PGP SIGNATURE-----