version problem in bash

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Jeremy C. Reed
Date:  
Subject: version problem in bash
On Thu, 23 Oct 2003, Nathan England wrote:

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


You asked for a "bash" way -- so no other tools (like ls or tail) are
needed.

> Thanks


You are welcome.

> > big="" ; for fn in * ; do [ "$fn" \> "$big" ] && big="$fn" ; done ; echo
> > $big


Jeremy C. Reed
http://bsd.reedmedia.net/