12-12-2015
What does "it braking" mean? Do you get error messages? Please post! Do you just get nothing? Pls say so...
What does "run it manually with epoc timestamps" mean? Running the script or running the awk command?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi Experts,
I am adding a column of numbers with awk , however not getting correct output:
# awk '{sum+=$1} END {print sum}' datafile
2.15291e+06
How can I getthe output like : 2152910
Thank you..
# awk '{sum+=$1} END {print sum}' datafile
2.15079e+06 (3 Replies)
Discussion started by: rveri
3 Replies
2. Shell Programming and Scripting
Hey,
So I've run into a problem, due to my limited knowledge of Bash scripting.
Basically I've got a long script and I want to understand it before I even try and edit it. As long as I don't understand the script, I will not bother editing it.
Anyway, the following variable confuses me... (5 Replies)
Discussion started by: abciscool
5 Replies
3. Shell Programming and Scripting
Hi all,
I have a script in which i need to run a command like "/opt/dell/srvadmin/sbin/omreport about" and output will be something like
Version : 6.3.0
Copyright : Copyright (C) xxx Inc. 1995-2010 All rights reserved.
Company : xxx Inc.
In this i need to save the version... (13 Replies)
Discussion started by: Renjesh
13 Replies
4. Shell Programming and Scripting
Hi all,
Hope someone can help me out here.
I have this BASH script (see below)
My problem lies with the variable path.
The output of the command find will give me several fields. The 9th field is the path. I want to captured that and the I want to filter this to a specific level.
The... (6 Replies)
Discussion started by: Cowardly
6 Replies
5. Shell Programming and Scripting
I am using a variable called $variable in a pattern search to print from a starting variable to a constant value. the variable search should be case in sensitive.
i tired using Ip at the end in the below command. but in ksh it is not working.
sed -n "/$variable/,/constant/p" file
i also... (11 Replies)
Discussion started by: johnjs
11 Replies
6. Shell Programming and Scripting
Dear Friends,
If i give the command echo $- i am getting output of himBH. Can some body explain what does it means
echo $-
himBH
Thanks in Advance
Rajkumar (2 Replies)
Discussion started by: rajkumarin
2 Replies
7. Shell Programming and Scripting
Greeting all! I could use some assistance please. :)
I've been searching for the best way to duplicate a line based on a variable in the next line.
Sample Data:
Nov 22 00:00:19 10.10.10.1 "%ASA-4-313005: No matching connection for ICMP error message: icmp src Outside:1.2.3.4 dst... (3 Replies)
Discussion started by: sjrupp
3 Replies
8. Shell Programming and Scripting
Hi Guys,
i have a file where data is in the below format::
data1 data2
data3 data4
data4 data6
my script written as::
#!/bin/ksh
cd $1
at now <<END
sh $2
END
Here i want to pass the values stored in the above file one by one till the end of line.
Here if i am doing it as:: (2 Replies)
Discussion started by: Atp3530
2 Replies
9. Shell Programming and Scripting
Experts,
Can someone help me with the below?
I've a variable called NSPMHOME=some_value. I would like change the value of the variable with another variable and something followed by it.
E.g
From NSPHOME=some_value to NSPMHOME=$SOMETHING/test
$SOMETHING has value /opt/tag .
The end... (4 Replies)
Discussion started by: jawaugh
4 Replies
10. UNIX for Beginners Questions & Answers
Hi,
I am trying to assign a value using below command and it is assigning the command to the variable not the output of the command?
out_value="echo $0 | cut -c 9-11";
How can i assign the output to the variable instead of whole command?
This is inside my awk script (7 Replies)
Discussion started by: bhagya123
7 Replies
SLEEP(1) BSD General Commands Manual SLEEP(1)
NAME
sleep -- suspend execution for an interval of time
SYNOPSIS
sleep seconds
DESCRIPTION
The sleep command suspends execution for a minimum of seconds.
If the sleep command receives a signal, it takes the standard action.
IMPLEMENTATION NOTES
The SIGALRM signal is not handled specially by this implementation.
The sleep command will accept and honor a non-integer number of specified seconds (with a '.' character as a decimal point). This is a non-
portable extension, and its use will nearly guarantee that a shell script will not execute properly on another system.
EXIT STATUS
The sleep utility exits 0 on success, and >0 if an error occurs.
EXAMPLES
To schedule the execution of a command for x number seconds later (with csh(1)):
(sleep 1800; sh command_file >& errors)&
This incantation would wait a half hour before running the script command_file. (See the at(1) utility.)
To reiteratively run a command (with the csh(1)):
while (1)
if (! -r zzz.rawdata) then
sleep 300
else
foreach i (`ls *.rawdata`)
sleep 70
awk -f collapse_data $i >> results
end
break
endif
end
The scenario for a script such as this might be: a program currently running is taking longer than expected to process a series of files, and
it would be nice to have another program start processing the files created by the first program as soon as it is finished (when zzz.rawdata
is created). The script checks every five minutes for the file zzz.rawdata, when the file is found, then another portion processing is done
courteously by sleeping for 70 seconds in between each awk job.
SEE ALSO
nanosleep(2), sleep(3)
STANDARDS
The sleep command is expected to be IEEE Std 1003.2 (``POSIX.2'') compatible.
HISTORY
A sleep command appeared in Version 4 AT&T UNIX.
BSD
April 18, 1994 BSD