Computing.Net > Forums > Unix > C Shell Script Helo

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

C Shell Script Helo

Reply to Message Icon

Name: SeaPlusPlus
Date: March 7, 2007 at 15:57:47 Pacific
OS: HP-UX
CPU/Ram: 1 GB RAM
Product: HP
Comment:

I have no idea on how to get the output of (cat filename) into a variable. Can someone help me out?



Sponsored Link
Ads by Google

Response Number 1
Name: nails
Date: March 7, 2007 at 18:37:37 Pacific
Reply:

Use command substitution. Those are backtics (below the tilde key)- not single quotes:

#!/bin/csh

set myvar=`cat filename`
echo "$myvar


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: C Shell Script Helo

C-shell script help www.computing.net/answers/unix/cshell-script-help/6828.html

C Shell script.. www.computing.net/answers/unix/c-shell-script/1537.html

decimal numbers in c shell scripts www.computing.net/answers/unix/decimal-numbers-in-c-shell-scripts/1945.html