• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

Executing a csh with a textfile in Unix

SoundTheSurrender

Diamond Member
I have a cshell program complete. What it does is read a text file. Right now it's static so all I have to do is type:

./cshscr

and it reads a file called testfile.

How would I go about making it dynamic?

./cshscr testfile

./cshscr book

./cshscr logfile

Thanks

 
It depends on how csh handles arguments and how much work you want to put into it. For example in bash $1 automatically contains the first parameter, $2 the second, etc or you can use getopts if you want real option processing.
 
Back
Top