10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
The variables given are already defined ($file1-$file3, $obsid1-$obsid3, and $n=3). When I go to run the code, the terminal outputs "Missing }." I believe the error is with the nesting of variables. It would save a lot of time getting this while loop working.
set i = 1
while (${i} <=... (5 Replies)
Discussion started by: ojdefdidit
5 Replies
2. Shell Programming and Scripting
CSH experts
What does the following do in CSH?
:(){:|:&};:
I was asked the question, but I don't know. I'm not aware of the context.
Any ideas?
Thanks! (1 Reply)
Discussion started by: wallg
1 Replies
3. Shell Programming and Scripting
Hi All,
Could any one of you give me a hand to convert the following line of codes from .sh to .csh please ?
proc_id=`fuser /tmp/test`
if
then
echo "File is not being used by any thing"
fi
if
then
echo "File is being used... please wait"
sleep 1
fi
Regards. (1 Reply)
Discussion started by: sraj142
1 Replies
4. Shell Programming and Scripting
I am trying to use \n for a new line in csh like this
echo "some text\n"
echo "some more text\n"
but am getting
some text\n
some more text\n (10 Replies)
Discussion started by: kristinu
10 Replies
5. Shell Programming and Scripting
I am using this code
echo "opt_tpath = $opt_tpath"
if ($opt_tpath == 1) echo " -tpath = $Atpath\n"
and is giving
opt_tpath = 0
Atpath: Undefined variable.
Atpath should only be printed in opt_tpath == 1 but it still tries to print.
---------- Post updated at 10:05 AM ----------... (1 Reply)
Discussion started by: kristinu
1 Replies
6. Shell Programming and Scripting
I have been using the if statement in csh like this
if ( $opt1 == 1 ) then
.....
elseif ( $opt2 == 1 ) then
......
endif
Seems to work, but got
Badly placed ()'s.
When I used a space in the elseif, a space between the 'else' and the 'if' it worked (0 Replies)
Discussion started by: kristinu
0 Replies
7. Shell Programming and Scripting
Hello all,
Had a quick question:
In a typical csh script should inputting via stdin (i.e. set i = $< ) increase the value of $#argv ?
echo enter an value:
set val= "$<"
if($#argv == 0) then
echo No args
else
echo The arg is $argv
so if a value is inputted #argv... (1 Reply)
Discussion started by: new2C
1 Replies
8. UNIX for Dummies Questions & Answers
what is a .csh extension?
there is a command line: mkaphed_ctio.csh
Does anyone know what this is? :confused::confused::confused: (1 Reply)
Discussion started by: cosmologist
1 Replies
9. Shell Programming and Scripting
I have an extraordinary problem with a csh script.....(feel free to berate the use of this but I'm modifying an existing bunch of them)
Anyway, I have a master csh script which in turn calls a second csh script. This second csh script is below. Within this second script are two compiled C++... (1 Reply)
Discussion started by: pollsizer
1 Replies
10. Shell Programming and Scripting
Hello this my first post, so i hope you help me
echo -n "Choose which square you want to hit of PL2 grid "
set pl2_square = $<
set i = 1
while ($i <= 6)
if ($pl2_square == $pl2_ships) then
$pl2_ships = x
echo ""
echo ""
echo "PL1 has hitted a square of PL2"
echo... (5 Replies)
Discussion started by: amaj1407
5 Replies