So, maybe that long of a sleep is giving the CPU fits? when I had this problem before, and wasn't using a sleep command, I solved it using sleep 1 which gave the CPU plenty of time to catch up on other things.
I can't imagine a company setting a policy against using one of the most powerful friends a sysadmin has. Amazing what people do.... But, I've an open mind. Convince me that prohibiting the use of cron is a good idea.
eg: If I execute an example tail statement to put rows from one file to another, it truncates some of the data.
/carrier>wc -l IntIndA.txt
1918 IntIndA.txt
/carrier>tail -1918 IntIndA.txt > test
/carrier>wc -l test
132 test
The tail command should copy 1918 rows to test file instead of... (4 Replies)
Dear all,
On my UNIX server there is an apache web log file. The rate of logging of data in this file is very high. I want to extract user logging log from this file in run time. As soon as the user logging log logged in this file I want to redirect this user log into another file.
I want to... (4 Replies)
I have this situation in my script (simplified):
A=C
C=10
I need to get number 10 using just A variable.
I tried with :
echo $`echo $A` - but i get $C string (i need number)
Thanks very much for any help! (1 Reply)
I'm currently running a script that checks to see if a laptop is on the network, and if it is it backs up, if not it retries it later.
Anyway, our backup scheduling has changed. I need to check if today's date is the Thursday after the first Wednesday of every month. This is made slightly more... (5 Replies)
Hi All,
I have problem in the following shell script (problem in 2and3 line i guess)
#!/bin/sh
set value1 = 90;
set value2 = 70;
if ; then
echo "$value1 is normal"
else
echo "$value2 is abnormal"
fi
when executed
output:
$ value_test.sh (Enter)
is abnormal
Neither it's printing... (13 Replies)
HI frnds
I have one flat with data and am loading the data into oracle table. While loading , rejected records are captured in log file. Now I want to read the log file and get the all rejected records and the reason for the rejection.
I developed the script . its finding 5000 rejected... (7 Replies)
Hi All,
My file contains data like below.
Key ~PILCSZY
First Name Szymon
Surname Pilch
User Code
Group SCO-PL
User Group Description SCO - Poland
Key ... (2 Replies)
I want to be able to copy DVD disks directly to an ISO file from the command line (via bash script).
I have such a script that I have refined over time that works quite well about 80% of the time.
About two DVD's out of ten will not burn to an iso file, and the script hangs on one of the... (4 Replies)
i=1
out=""
j=`expr 2 * $1`
while
do
out="$out"#""
echo $out
((i=i+1))
done
while
do
print ${out%?}
((i=i+1))
done
This script is throwing an error:
gurnish:/home/fnb/gurnish/saurabh/scripts> while1 3
expr: 0402-050 Syntax error.
# (6 Replies)
Hi,
I am Shell script beginner.
I wrote a shell programming that will take each line of a file1 and search for it in another file2 and give me the output of the lines that do not exist in the file2.
I wrote it using do while nested loop but the problem here is its running for ever . Is there... (12 Replies)
Discussion started by: sakthisivi
12 Replies
LEARN ABOUT OPENSOLARIS
sleep
sleep(1) User Commands sleep(1)NAME
sleep - suspend execution for an interval
SYNOPSIS
/usr/bin/sleep
/usr/bin/sleep time
ksh93
sleep time
DESCRIPTION
/usr/bin/sleep
sleep suspends execution for at least the integral number of seconds specified by time.
ksh93
sleep suspends execution for at least the time in seconds specified by time or until a SIGALRM signal is received.
OPERANDS
/usr/bin/sleep
The following operands are supported for /usr/bin/sleep:
time time in seconds can be specified as a non-negative decimal integer number.
ksh93
The following operands are supported:
time Specify time in seconds as a floating point number. The actual granularity depends on the underlying system, normally around 1 mil-
lisecond.
EXAMPLES
Example 1 Suspending Command Execution
The following example executes a command after a certain amount of time:
example% (sleep 105; command)&
Example 2 Executing a Command Every So Often
The following example executes a command every so often:
example% while true
do
command
sleep 37
done
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of sleep: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 The execution was successfully suspended for at least time seconds, or a SIGALRM signal was received (see NOTES).
>0 An error has occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
/usr/bin/sleep
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|Standard |See standards(5). |
+-----------------------------+-----------------------------+
ksh93
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Uncommitted |
+-----------------------------+-----------------------------+
SEE ALSO ksh93(1), wait(1), alarm(2), sleep(3C), wait(3UCB), attributes(5), environ(5), standards(5)NOTES
If the sleep utility receives a SIGALRM signal, one of the following actions is taken:
o Terminate normally with a zero exit status.
o Effectively ignore the signal.
The sleep utility takes the standard action for all other signals.
SunOS 5.11 20 Nov 2007 sleep(1)