true(1) User Commands true(1)NAME
true, false - provide truth values
SYNOPSIS
true
false
DESCRIPTION
The true utility does nothing, successfully. The false utility does nothing, unsuccessfully. They are typically used in a shell script sh
as:
while true
do
command
done
which executes command forever.
EXIT STATUS
true has exit status 0.
false always will exit with a non-zero value.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO sh(1), attributes(5), standards(5)SunOS 5.10 1 Feb 1995 true(1)
Check Out this Related Man Page
sleep(1) User Commands sleep(1)NAME
sleep - suspend execution for an interval
SYNOPSIS
sleep time
DESCRIPTION
The sleep utility will suspend execution for at least the integral number of seconds specified by the time operand.
OPERANDS
The following operands are supported:
time A non-negative decimal integer specifying the number of seconds for which to suspend execution.
EXAMPLES
Example 1: Suspending command execution for a time
To execute a command after a certain amount of time:
example% (sleep 105; command)&
Example 2: Executing 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:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Standard |
+-----------------------------+-----------------------------+
SEE ALSO 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 will be taken:
o Terminate normally with a zero exit status.
o Effectively ignore the signal.
The sleep utility will take the standard action for all other signals.
SunOS 5.10 1 Feb 1995 sleep(1)
Hi there
I'm hoping one of the expert unix guys or gals can assist me in understanding the language within scripts
e.g
clear
while true
do
tput cup 0 0
LIST=`grep cisco /etc/hosts|grep -v _int | awk '{print $2}'`
for SITE in $LIST
do
IP=`grep "$SITE"... (4 Replies)
i want to delete every newline and every line which starts with "RECORD......." in a file.
FILE:
Record 61391 in base BROCKHAUS (Timestamp: 2008-04-09 11:38:38)
UNTERTITEL :
Gräfin (seit 1707 Reichsgräfin) von, * Schwerin 4. 2. 1686, + Berlin
21. 10. 1744; wurde
Record 61392 in base BROCKHAUS... (4 Replies)
Hi,
I'm new to UNIX and am trying to learn shell scripting in order to work on an interface that I inherited when a co-worker left. I need to be able to check to see whether a file exists to determine whether the FTP has taken place, but in testing, the if statement always evaluates as false,... (3 Replies)
Hi all,
If anyone has the explanation for the following issue, please share it with me.
I am comparing two variable a and b with the values of 007 and 7, for these values it get evaluated as True. For a=008 and b=8, for these values it get evaluated as false.
#!/bin/tclsh
set a 007 ... (3 Replies)
Hi Experts,
I am using Solaris-10, Sun-Fire-V445.
i got often the below message-
"Memory Usage – Critical, Memory usage (RAM) exceeding 90%
The memory utilization is exceeding 90%" in a application running on solaris.
I checked with Vmstat. Everything seems to be fine. Where i should... (5 Replies)
Just started with learning python and tried something, most people here would call more than simple.
I just wanted to list all directories within my main directory. So I user the following code:
#!/usr/bin/env python
import os
if os.path.isdir("/home/testaccaunt/public_html"):
... (8 Replies)
I'm using clustered zones on my machine. i'm only at the test phase of my design and ultimately the oracle zones will be using VxVM.
When the testing phase is complete, VxVM will be used in the containers. It is necessary for VxVM to run in the global zone for the containers to use it (is... (5 Replies)
Hello All,
Nagios seems to be sending false alerts about few hosts, (ex: There were no users on one host and still Nagios was reporting a critical alert and says 6 users are logged in. How do I fix this one?
Also, I have installed nagios and added 12 hosts as a start and monitoring few... (4 Replies)
hi Alll,
I want to install solaris 10 on exixting solaris mahcine.
I tried for OK boot cdrom-install
but it gave me fatal error - disk not bootable , boot command disable
so i tried with
ok setenv auto-boot? false
Ok reset-all
after this server rebooted automatically and... (2 Replies)
Hi Experts,
I was looking at the below link, for finding words next to it, And unable to understand this syntax:
Can any one please explain , what is meaning of this code:
if ( F )
s = s ? s OFS $i : $i
from:... (4 Replies)
Heyas
As there was a splitting issue with TUI 0.6.6-x focused around tui-status since the 'solaris' (not really but for that purpose) update, the urge was given to do this first.
Well, the splitting 'bug' should be fixed, i hope.
But i've found a new one.
When i start the very same script... (4 Replies)
I have this code that sometimes return a false value and the code inside the if statement gets executed and error out. Any idea why? thanks.
So I set a debug and see what the value for $ScriptElapsedTime
Here is the value I got ScriptElapsedTime='03:20'. Base on this value the if... (10 Replies)
Hi All,
I'm trying to come up a way to check the output of some data i have. I need to be able to check for the order of the output and if its correct set a variable to false if it isnt.
Currently the data is in the below format, this is the value which should cause the variable be set... (4 Replies)
Hi
I have written a script to send email alerts when load of my linux server reaches max point
I keep getting false emails thought the load is normal , looks like same email is generated again and again - called from cron tab
checked if the tempfile is present , no it is not , cleaned... (22 Replies)
Hi All
Below code is working as expected but creating too many child processes when the url is not up and every minute that process is sending false email alerts
any help with the logic not to generate child process and not to send duplicate alerts
app="https://url"
appresult=$(wget... (2 Replies)