10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a file number.txt.I need to get 2 inputs from the terminal like a=100 and b=200.If a and b are there in the file,then check if a < b,print "less".If a is not there in the file,print "a is missing" or if b is not there in the file,print "b is missing".
number.txt:
100 200 300 (2 Replies)
Discussion started by: aneeta13
2 Replies
2. Shell Programming and Scripting
I am suppose to make a program that cuts the extension off of a file. It uses that .ext to decide which program needs to be used to open the file. This only finds the name of the program from a list of programs I made. My problem is when it has the name of the program it needs to use, how can I... (3 Replies)
Discussion started by: dordrix
3 Replies
3. Shell Programming and Scripting
Hi,
I have a tab delimited file in which first row is the header and others rows has the values.
A B C D
2 4 0.00 3.00
0.00 9.78 4654 898
I have to check whether all the values are zero.
A B C D
0.00 0 0.00 0.00
0.00 0.00 0 0.000
Send mail if all the values in file are zero (4 Replies)
Discussion started by: sandy1028
4 Replies
4. Shell Programming and Scripting
How to check if the file contains only numeric values.
I don't want to read entire file it eats lot of cpu
Or any way which consumes less memory n cpu..
Please suggest
-S (2 Replies)
Discussion started by: sunilmenhdiratt
2 Replies
5. Shell Programming and Scripting
Hi,
Thanks for keeping such a help-full platform active and live always.
I am new to this forum and to unix also.
Want to know how to count the repetition of a field in a file. Anything of awk, sed, perl, shell script, solution are welcomed.
Input File------------------
abc,12345
pqr,51223... (10 Replies)
Discussion started by: indian.ace
10 Replies
6. Shell Programming and Scripting
Guys,
I am writing a script to delete files 5 min old in Sun Os Unix.
find . -name "*.txt" -mtime +1 -print
I could find an equivalent command to look for files which are 5 min old. i tried -mmin option it didn't work either.
Can any body trow a light on this.
Cheers :)
S:b: (5 Replies)
Discussion started by: sudharma
5 Replies
7. Shell Programming and Scripting
I have 2 separate Bourne shell scripts with 2 questions in Sun O/S & UNIX environment.
Question 1: One of the scripts is supposed to be executed by "root" user only but cannot be executed after user executes "su - oracle". How can I check in the script whether the current user is "root" user?... (8 Replies)
Discussion started by: totziens
8 Replies
8. UNIX for Dummies Questions & Answers
How do I test for the presence of a file in Bourne Shell (3 Replies)
Discussion started by: vins
3 Replies
9. UNIX for Dummies Questions & Answers
Im trying to code some logic into a test script to test for the existence of a file before recreating it. Im using the following line to test for this:
if -r test.txt;
However I get the error message
./testScript.sh: -r: not found
Having read through the man pages im still not clear whats... (2 Replies)
Discussion started by: blakmk
2 Replies
10. Shell Programming and Scripting
Hello,
I have a file called Delete and within the delete file I have the following statement:
delete from employee where employee_id = " "
how do I write a script that read from this file and replace:
employee_id = " " with employee_id is null
Please assist...greatly... (3 Replies)
Discussion started by: kenix
3 Replies