10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi all,
I have a bash script in which it runs multiple if conditions if a word count from a grep is equal to a number. When this number is not reached I want to sleep for very few seconds (let's say 3) and start over again, till it matches the word count of 8.
Here's a sample of the code so... (6 Replies)
Discussion started by: nms
6 Replies
2. Shell Programming and Scripting
I need a script that will search through multiple files and when the first 2 columns match, print out Columns 1 and 2 and the minimum value.
File 1
24.01 -81.01 1.0
24.02 -81.02 1.0
24.03 -81.03 3.0
File 2
24.01 -81.01 5.0
24.02 -81.02 3.0
24.03 -81.03 ... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
3. Shell Programming and Scripting
I need to find the max/min of columns 1 and 2 of a 2 column file what contains the special character ">".
I know that this will find the max value of column 1.
awk 'BEGIN {max = 0} {if ($1>max) max=$1} END {print max}' input.file
But what if I needed to ignore special characters in the... (3 Replies)
Discussion started by: ncwxpanther
3 Replies
4. Shell Programming and Scripting
Hi Gurus,
I am working one below script. I am stuck at the else condition.
#!/bin/ksh
while :
do
cur_date=`date |cut -d"," -f 1`
cur_time=`date +"%H%M"
if ||; then
if && ; then
echo "File " $FIRST_FILE "... (8 Replies)
Discussion started by: ken6503
8 Replies
5. Shell Programming and Scripting
Hi,
Can any1 provide the code for my req:
I am loading few set of files into database through one unix script. I ll try to describe the process:
load_cdr-->main script
Source Feeds are A & B.
File in A-akm.dat
File in B-bkm.dat
Now my script runs through cron jobs everyday...and for both... (6 Replies)
Discussion started by: gnnsprapa
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to check if a file is modified or not in the last 10 mins and run a script if so. Thanks (8 Replies)
Discussion started by: krabu
8 Replies
7. Shell Programming and Scripting
hi,
A script which look into a directory and send an alert via a mail. If there is any file exisiting in a directory for more then 10 min. (5 Replies)
Discussion started by: madfox
5 Replies
8. Shell Programming and Scripting
I would want to run a code for 1 min and if it doesnt succeed in 1 min..I would want to exit it..I am using the following code...But the script is not going into my code part.It is waiting for 60 secs and then getting killed.
The code which is in the while loop actually takes less than 60 secs...... (6 Replies)
Discussion started by: infernalhell
6 Replies
9. Shell Programming and Scripting
This is a very crude attempt in Bash at something that I needed but didn't seem to find in the 'sleep' command. However, I would like to be able to do it without the need for the temp file. Please go easy on me if this is already possible in some other way:
How many times have you used the... (5 Replies)
Discussion started by: deckard
5 Replies
10. Shell Programming and Scripting
how to start a process and make it sleep for 5 mins and then kill that process (6 Replies)
Discussion started by: shrao
6 Replies