SUMMARY: Variable question

From: Jeff Kennedy <jlkennedy_at_amcc.com>
Date: Mon Nov 19 2001 - 20:45:26 EST
Thanks to Mark McManus and Aleksey Tsalolikhin.

Mark gave me the next best thing (which I actually knew but I swear I
heard there was a variable that would do what I mentioned, oh well).

input_size=`wc -l $INPUT_FILE | awk '{print $1}'`

Thanks.

~JK

Jeff Kennedy wrote:
> 
> What is the variable that stores the output of the previous command?
> 
> For example, I am trying to run
> 
> wc -l $INPUT_FILE
> if [ <special variable> -le 24 ]
> then
>         split -l 24 $INPUT_FILE
>         $COMMAND < $INPUT_FILE
> else
>         $COMMAND < $INPUT_FILE
> fi
> 
> What is the "special variable"?  I am almost positive it exists but I
> can't find it anywhere in my scripting book.  Also, can anyone recommend
> a really good scripting book for advanced beginner level?  The one I
> have is "UNIX Shell Programming - Revised Edition".
> 
> Thanks.
> 
> --
> =====================
> Jeff Kennedy
> Unix Administrator
> AMCC
> jlkennedy@amcc.com

-- 
=====================
Jeff Kennedy
Unix Administrator
AMCC
jlkennedy@amcc.com
Received on Tue Nov 20 01:45:26 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:32:36 EDT