10 More Discussions You Might Find Interesting
1. 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
2. Shell Programming and Scripting
I am working on script for stale nfs.
the file consists of
cat data01stale.log
- - - - /abcd/backup
- - - - /abcd/data
Script (16 Replies)
Discussion started by: nareshkumar522
16 Replies
3. Shell Programming and Scripting
If I want to compare two string variables in csh how do I correctly implement it. For example I'm checking if on cmdln the $1 == -r do something.
if($1 == -r) then
code....
However when I run it I just get an error message "if: Missing file name".
Any suggestions? (1 Reply)
Discussion started by: ROFL
1 Replies
4. Shell Programming and Scripting
Hi expert,
I have a large text file :-
number.txt
1
2
3
4
5
6
....
And i using csh foreach loop to read the file line by line.
foreach line(`cat number.txt)
set number = $line
<Calculation>
end (2 Replies)
Discussion started by: vincyoxy
2 Replies
5. Shell Programming and Scripting
Hi All,
I am facing 'No Match' problem with foreach loop in C shell script.
Initially I tried following grep command showing results properly as shown at the end of the Thread. But foreach command is throwing the error 'No match'.
grep -n Inserted audit_file
foreach insertstr (`grep -n... (0 Replies)
Discussion started by: adurga
0 Replies
6. UNIX for Dummies Questions & Answers
Hi,
This is my script to catch any oracle errors.
In this, the $sqlerr returns
ORA-01017: invalid username/password; logon denied
when i specify wrong username/password
the if condition is failing. how can i resolve the issue.
the if statement gives error
sqloutput=`sqlplus -s -L... (1 Reply)
Discussion started by: Swapna173
1 Replies
7. UNIX for Dummies Questions & Answers
Hi,
My script should run through all subdirs recursively in SUBDIR_LIST, run a clearcase command in each subdir, print to the merge_results1.txt and add a new line to the results before going to the next subdir. All the results should append to merge_results1.txt, but are seperated by a line so... (8 Replies)
Discussion started by: asulli01
8 Replies
8. Linux
Hi ,
I am getting an error when I run the script for checking word "view" in a file . I am using if statement. like this
if
then
VW_VAR=` cat $TN.${ecmdate}.sql1 | grep -i view | awk '{print $3}' | cut -d '.' -f2 `
echo " VW_$VW_VAR "
sed -e... (16 Replies)
Discussion started by: capri_drm
16 Replies
9. Shell Programming and Scripting
:b:hi,
I have a script as given below:
pr_det="1"
if
then
awk ' BEGIN {printf("%23s","session")}' >> report.txt
awk ' BEGIN {printf "\n"} ' >> report.txt
else
awk ' BEGIN {printf("%55s","file_dsc")} ' >> report.txt
awk ' BEGIN {printf("%101s","no_recs")} '... (1 Reply)
Discussion started by: jisha
1 Replies
10. Shell Programming and Scripting
I wrote a simplistic script which works fine in my HP Korn environment using for in do done but when I converted it for csh it is balking at my syntax specifically the parens for the argument. Any help would be appreciated
set -x
cut -f1 -d,... (3 Replies)
Discussion started by: r1500
3 Replies