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
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Mon Nov 19 19:47:22 2001

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:28 EST