10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
You might find it very trivial but actually don't know how to loop through all sub-directories and their child directories into a csh. bash was easier I believe but here I am, stuck with csh. So elaborately here's my problem:
Let's say I have my parent directory named C-H/ under which I have... (15 Replies)
Discussion started by: saleheen
2. Shell Programming and Scripting
How can I make this work with CSH:
while ($I != $K)
@ I = $K + 1
Any help you can provide or links that can help is greatly appreciated.
With above I get an error
"while: Expression Syntax" (3 Replies)
Discussion started by: manglalayag
3. UNIX for Dummies Questions & Answers
Hi everyone I'm new to unix and encountered a small problem i couldnt find out a reason why it doesn't work..please help..
in my csh script when i tried to use the foreach loop like this:
foreach x ( ls )
when i tried to run it, it printed out 'ls' to the std out instead of... (3 Replies)
Discussion started by: ymc1g11
4. Shell Programming and Scripting
I know cshell is harmful:) but I am using this just "to know" - for educational purposes!... not for a long-term use.
lets say i have a list..
set arr=(x y z e f)
I wanna iterate the list with foreach ,, not with while.!!
foreach i $arr
does not work (2 Replies)
Discussion started by: eawedat
5. Shell Programming and Scripting
I have the following code and want to use a loop to output the results to the fparams file.
if ($optparams == 1) then
# Set the tdarwin parameters
set txt01 = "Call to raytrac.csh"
set txt02 = ""
set txt03 = "./Scripts/raytrac.csh $*"
set txt04 = ""
set txt05 =... (0 Replies)
Discussion started by: kristinu
6. Shell Programming and Scripting
I have variables like
if loop i am trying to check the condition
if(variable == "var") then
endif (0 Replies)
Discussion started by: vasanth.vadalur
7. UNIX for Dummies Questions & Answers
How can i control for loop with two different variables in csh shell
Nikhil (1 Reply)
Discussion started by: Nikhilindurkar
8. UNIX for Dummies Questions & Answers
I have a file with over 48000 lines and I need to select certain parts of the file. I know which awk commands work for what I need, I just need some help putting together a loop that will repeat the command. These are the commands that work:
awk 'NR < 6' plot.out > plot.test (I get... (1 Reply)
Discussion started by: dsstamps
9. Shell Programming and Scripting
I'm no unix pro for sure, but I have programmed enough other languages to usually get the job done in unix when I have to.
I'm currently trying to automate a manual diagnostic process. One of the steps in the manual process generates a file of text output. The next step is running a small... (4 Replies)
Discussion started by: bschnair
10. Shell Programming and Scripting
I'm using a `while(1)` loop to dispaly real-time information about various files on my system, and I use ^C to exit it when needed. I was hoping there was a way to exit the script on a normal keystroke such as "q". Can someone point me in the right direction? I'm willing to use a... (7 Replies)
Discussion started by: seg