09-07-2007
use 'sleep n'
--------------------------
Usage: sleep NUMBER[SUFFIX]...
or: sleep OPTION
Pause for NUMBER seconds. SUFFIX may be `s' for seconds (the default),
`m' for minutes, `h' for hours or `d' for days. Unlike most implementations
that require NUMBER be an integer, here NUMBER may be an arbitrary floating
point number.
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Any idea to repeat an action to all the lines in vi...
suppose i want to delete the first word from all the lines in VI .. how would i do it ?
in general i am also looking for a way to apply a action to all the lines in VI . (6 Replies)
Discussion started by: myelvis
6 Replies
2. UNIX for Advanced & Expert Users
I would like to increase the speed that characters repeat when a key is held. My older machines had a BIOS setting to control speed.
I am using SCO Openserver. (1 Reply)
Discussion started by: tecss
1 Replies
3. UNIX for Dummies Questions & Answers
On my system I use Escape "k" to go back in commands. I read on tutorials that it is ctrl p, but that does not work on my system.
Anyone know what the command to go foward is? (6 Replies)
Discussion started by: dereckbc
6 Replies
4. Shell Programming and Scripting
I have a file that I need to reiterate all the lines. This is a text file with pipe delimeters, four fields and 133 lines.
file1.txt
-----
0 | 0 | 1 | random TEXT1 |
0 | 0 | 2 | random TEXT2 |
0 | 0 | 3 | random TEXT3 |
...
0 | 0 | 133 | random TEXT133 |
-----
Now, I need all 133... (3 Replies)
Discussion started by: ajp7701
3 Replies
5. UNIX for Dummies Questions & Answers
I have:
aa01
aa02
aa03
aa04
ab01
ab02
ab03
ab04
I would like each record printed 5 times:
aa01
aa01
aa01
aa01
aa01
aa02
aa02 (6 Replies)
Discussion started by: kenneth.mcbride
6 Replies
6. UNIX for Dummies Questions & Answers
Hi,
Often when I use echo statements in scripts I echo a line of #'s above and below. For example:
echo #####
echo hello world
echo #####
However, I generally have a series of about 75 #'s. For example:
echo #(x 75)
echo hello world
echo #(X 75)
While this helps to delineate... (7 Replies)
Discussion started by: msb65
7 Replies
7. Shell Programming and Scripting
I have a file like this
2011-10-10 10:46:00,1-1-13-1-1,151510,ALCLA0A84D2C
2011-10-10 10:46:00,1-1-13-1-1,151520,65537
2011-10-10 10:46:00,1-1-13-1-1,151515,46932
2011-10-10 10:46:00,1-1-13-1-1,151521,32769
2011-10-10 10:46:00,1-1-13-1-1,151522,32769
2011-10-10... (4 Replies)
Discussion started by: LavanyaP
4 Replies
8. Shell Programming and Scripting
How do i write a loop ping to see if it get timeout or hang ? it should loop every 30 second to ping a server ?
ping -c 5 -t 15 www.google.com
if ]; then
date '+%Y-%m-%d %H:%M:%S Connection Unavailable' >> /home/sabercats/checkconnection.log
else
date '+%Y-%m-%d %H:%M:%S Connection... (3 Replies)
Discussion started by: sabercats
3 Replies
9. Shell Programming and Scripting
Hey,
I've created following script:
var1=test1
setA=testA
if
...
touch $setA/$var1
...
fi
I would like now the repeat the command touch (in this example) for different variables.
So below, the varX should run 3 times (var1, var2, var4). Var3 is skipped in this example... (4 Replies)
Discussion started by: brononius
4 Replies
10. UNIX for Dummies Questions & Answers
Assume i have typed 4 commands in the past like
vi `ls -t |head -n 1`
tail -2 test.txt
ls -lrt | grep "/etc/profile.d"
pwd
Now if i type r p it should execute the command "pwd" likewise r t should execute tail -2 test.txt.
Note: esc k and using up arrow and down arrow will get this work... (3 Replies)
Discussion started by: Ramanareddygv
3 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)