If I understand you correctly, I think you want:

six=`tail -n1 numbers.dat`

- Jared

On Sunday 02 June 2002 09:53 am, you wrote:
> This should be an easy one, but for some reason I can't find the docs I
> need.  In a bash script, how do you store the return of a program into a
> variable?  For instance, I have a dat file:
> 001
> 002
> 003
> 004
> 005
> 006
> I want to store the 006 into $six.  I thought I could do something like:
>
> six=tail -n1 numbers.dat
>
> but that didn't work.  What am I missing?  Also, is there a way I can use
> a sed command to strip off the leading 00?  TIA!!!
>
> -Brian
>
> _______________________________________________
> Twin Cities Linux Users Group Mailing List - Minneapolis/St. Paul,
> Minnesota http://www.mn-linux.org
> tclug-list at mn-linux.org
> https://mailman.mn-linux.org/mailman/listinfo/tclug-list