10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
Below is a script I'm writing and giving me error:
#!/usr/bin/sh
if ; then
echo "Success!"
else
echo "Failure!"
fi
Normally if I do ps -ef|grep dw.sap|wc -l it gives me output of 18. So my script checks if it's greater than 17 it echoes success else failure
... (5 Replies)
Discussion started by: frum
5 Replies
2. Shell Programming and Scripting
Hi,
I hope you can help me with the awk command in shell scripting.
I want to do the following, but it doesn't work.
for i in $REF1 $REF2 $REF3; do
awk '{if($n>=0 && $n<=50000){count+=1}} END{print count}' ${DIR}${i} >${DIR}${i}_count.txt
done
REF1 to REF3 are only variables for .txt... (1 Reply)
Discussion started by: y.g.
1 Replies
3. Shell Programming and Scripting
Hi friends
i need a help on Perl Script
In My Home directory, i have some other directories and inside those directories i have some subdirectories and all the directories contains files.
Now i want to count a word in all files and i want the output like below
wordcount in which file(name... (5 Replies)
Discussion started by: siva kumar
5 Replies
4. Shell Programming and Scripting
I need to write script, counting the number of visitor to this script. help me please!
Code tags for code, please. (1 Reply)
Discussion started by: numeracy
1 Replies
5. Shell Programming and Scripting
i should use this script runs how many times before ?
how can i do_? (3 Replies)
Discussion started by: utoptas
3 Replies
6. Shell Programming and Scripting
Should work in any shell, but requires GNU date, although GNU date seems only to be happy for input dates between 1902 and 2037, inclusive (49673 days).
Assume $a and $b hold two dates, e.g.
set a=2010-03-27
set b=2010-04-04
Marginally faster:
iterator: seq -f "$a +%1.0f days" 1 50000 |... (0 Replies)
Discussion started by: laddiebuck
0 Replies
7. UNIX for Dummies Questions & Answers
I tried this script to get a count of the occurrence of a string in files.
I have multiple files in one directory I will use this on.
All the filenames begin "invALL.06" The script works, except it counts twice for every one instance of 'Invoice Total'.
If there are 5 occurences of 'Invoice... (2 Replies)
Discussion started by: scarletsupra
2 Replies
8. Shell Programming and Scripting
Ok, so this is a small part of a script I wrote to build disk groups using VXVM. The only problem is that I am limited to a count of 8 maximum. If I want more, I will have to add more lines of "if" statements. How can I accomplish the same thing, in a few lines, but not be limited in the max... (13 Replies)
Discussion started by: LinuxRacr
13 Replies
9. Shell Programming and Scripting
Hi,
I have a script which greps for a word in a file contains records.
I grabbed a particular column & sent the colomn values to a file.
I need to find each column value, the times it appeared in the file.
My script is:
grep sceneority <file> | cut -f 6 >> swi
With... (4 Replies)
Discussion started by: pradeep_script
4 Replies
10. UNIX for Dummies Questions & Answers
Hello,
I am writing a shell script and I need to find a way to
count the number of whitespaces in a string.
Eg:
NAME="Bob Hope"
I am looking for a way to count the number of whitespaces in this string. So a command that would take this string and return 1.
Or take
"First Middle Last"... (3 Replies)
Discussion started by: kevin80
3 Replies