10 More Discussions You Might Find Interesting
1. UNIX for Beginners Questions & Answers
I would like to know if indentation is relevant for Cshell scripts.
I wrote my code like this:
if ((-e file1) && (-e file2)) then
cat file1 > file10
cat file2 > file20
endifUsually I write my if clauses like this:
if ((-e file1) && (-e file2)) then
cat file1 > file10
... (1 Reply)
Discussion started by: maya3
1 Replies
2. Shell Programming and Scripting
i have in c-shell
set value_str ="one three"
set line_seprator = ","
set value_and_sperator = "$value_str$line_seprator"
setenv STRING_CONCAT $STRING_CONCAT$value_and_sperator
and im getting error:
setenv: Too many arguments.
this is... (1 Reply)
Discussion started by: umen
1 Replies
3. Shell Programming and Scripting
Hi,
while executing the following c-shell script i got the error
"Couldn't find an 'end' to close a 'foreach' statement"
can't find the mistake ...plz help..
script ::
echo "enter build folder name in following sequence L-<REV>_<BUILD>"
set BUILD = $<
set file= `cat file1`
foreach i... (2 Replies)
Discussion started by: arup1980
2 Replies
4. Shell Programming and Scripting
Hi .I am trying to check the first arguments =-s and the third =-d,but it doesnt work ,any idea why
It gives me if: Missing file name
Thanks
#case -s and files
if( $1 == "-s" && $3 != "-d" ) then
echo "case s"
endif (1 Reply)
Discussion started by: lio123
1 Replies
5. Shell Programming and Scripting
Hi ,I have this simple code,why is not working
thanks
#!/bin/csh
set res=find ./ -name "*.bash" | wc -l
$res > result.txt (16 Replies)
Discussion started by: lio123
16 Replies
6. Shell Programming and Scripting
Hello everyone! i'm new in this forum and I'm here because I have a huge problem with a csh script. Here the problem: I have to write a script that check the system status, more precisely I have to check if there are processes with TIME > 3 hours and if such processes exists I must send a mail... (3 Replies)
Discussion started by: TheBeefEater
3 Replies
7. Shell Programming and Scripting
Hi guys,
Basically I'm trying to write a CShell script that calls an awk script on a given directory (given in command-line). I keep getting a syntax error with my code though:
#!/bin/csh
set dir = $ARGV
foreach file ( $dir/* )
set output = 'awk -f /Desktop/aal $file'
echo... (3 Replies)
Discussion started by: ROFL
3 Replies
8. UNIX for Dummies Questions & Answers
Hello...
I am new to unix and I am wondering if in a C-shell script , Are we supposed to use only whole numbers........ for example..if a program needs to calculate the average of some numbers........
@ avg = (($1 +$2 + $3)/3)) is returning a whole number.........How can a decimal be achieved... (1 Reply)
Discussion started by: ravindra22
1 Replies
9. Shell Programming and Scripting
Hi,
I want to know whether it is possible to use GUI for cshell scripts?
Thanks
Sarbjit (0 Replies)
Discussion started by: sarbjit
0 Replies
10. UNIX for Dummies Questions & Answers
Hi Everyone,
I'm facing a problem using grep in Cshell.
This is what i'm trying to do:
grep "abc" somefile
VAR="$?"
echo $VAR
somefile contains:
abc
def
ghi
Now, should'nt my output be 0 (Zero)
I'm getting 1 (One)
Can you please help me out.
Thanks in advance :)
G1 (2 Replies)
Discussion started by: jeevan_fimare
2 Replies