Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

use pipeline to assign variable in C-shell ..Help!!!

Status
Not open for further replies.

suhaimi

Technical User
Aug 3, 2001
71
US
Hi,
How do I assign a variable in a PIPELINE in C-Shell? Please, in C-shell. Not other shell

example:

#!/bin/csh
set var=" "
echo &quot;cc&quot;|<do something so that var=&quot;cc&quot;>
echo $var
cc

I KNOW this method and DONOT want to use it for certain reasons:
set var=`cat file.txt|tail -l`


The variable assignment MUST BE in PIPELINE in C-shell please.

Thanks,
Suhaimi

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top