wademi
asked on
How to save and execute a C shell scrip?
I have a simple Cshell script as follows:
#! /bin/csh -f
set SourceDir = /home/milligram/mnt
set DestDir_IOS = Myvideos/IOS
chdir $SourceDir
foreach directory (`ls`)
test -d "$SourceDir/$directory" && echo "$SourceDir/$directory"
end
How do I save and execute the above script to a file in ubuntu and execute it via a terminal session?
where should I store the script?
#! /bin/csh -f
set SourceDir = /home/milligram/mnt
set DestDir_IOS = Myvideos/IOS
chdir $SourceDir
foreach directory (`ls`)
test -d "$SourceDir/$directory" && echo "$SourceDir/$directory"
end
How do I save and execute the above script to a file in ubuntu and execute it via a terminal session?
where should I store the script?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
./script.csh > filename_where_results_wil