07-03-2011
If I add something between the exit 0 and done, will that be executed after yhe size check has finished ?
Also, I'd prefer to have "the stuff that has to be done by the script" to be only executed once, and before that loop even starts, then loop till the sizechange isn't happenig anymore and after that continue with whatever I might still want.
Could this possibly be done in more compact form (one-liner lol ?)
Thanks for your answer.
10 More Discussions You Might Find Interesting
1. AIX
Can any help me to change the default font type and its size..
To clear more about my question..
Once i login to my unix domain... the font it displaying is of small size...
all my shell commands i am executing in $ prompt also carries the same style(ls, date and echo...)
i searched whole... (2 Replies)
Discussion started by: tsjpraveen
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
first of all, I want to make myself clear about my language. I'm brazilian, so I ask you all to understand if i commit any mistake with the grammar.
Here is the problem.
Some days ago I needed to use a "sh" command in the Terminal (I use a Mac OSX 10.5.6) followed by a file... (0 Replies)
Discussion started by: anubisbr
0 Replies
3. UNIX for Dummies Questions & Answers
Hi there,
I am having a small issue with the mail function on our controllers. Recently we set up all the boxes as NFS slave servers and mail sending was not affected. We then had to change the servers addresses in resolv.conf and now email is being queued and not being sent.
I have restarted... (3 Replies)
Discussion started by: lodey
3 Replies
4. Shell Programming and Scripting
Hi,
I've written a shell script to take photos with my camera.
After every picture taken, the picture is transmitted to the computer via usb and then deleted on the camera.
But sometimes there's an error and the picture is not deleted and so, after a certain time, the camera chip will be... (4 Replies)
Discussion started by: McLennon
4 Replies
5. Shell Programming and Scripting
Hi All,
How to introduce delay in the Bash/Shell Script till key stroke.
Below is the requirement..
1.Execute set of commands.
2.Display the message echo "press any key to continue"
Introduce a delay till key stroke.
3.Execute next set of commands.
Thanks in Advance
Sunil.K (5 Replies)
Discussion started by: sunilrk07
5 Replies
6. Shell Programming and Scripting
Hi All,
Can anyone refer to me a readymade script for the purpose of log folder size monitoring script.
Example : I have a log folder of size 10 G, and as the logs keep accumulating the folder gets full and i have to manually zip/remove the files in order to keep the server running. Something... (1 Reply)
Discussion started by: findjai
1 Replies
7. Red Hat
Our SAN administrator decided to unpresent then destroy LUN's we were actively using as a volume group (all PV's in said volume group). Now every time I do a pvscan or whatever it complains about I/O errors trying to access those PV's. How do I get it to forget the VG existed completely? vgreduce... (7 Replies)
Discussion started by: thmnetwork
7 Replies
8. Shell Programming and Scripting
can any one help me with a unix command to find out the size of each directory for files placed between 2 dates i.e., date1 & date 2? (3 Replies)
Discussion started by: Codesearcher
3 Replies
9. UNIX for Dummies Questions & Answers
" Script for display sentences with special character"
Hi,
Could any one share a command how to display a line until my target word.
For ex: My file has the content as:
select * from db_wrk where col1 < col2
insert into table_name values('1','2','tst','wrk','dev','prod')
My target... (10 Replies)
Discussion started by: Kalaiselvi66
10 Replies
10. Shell Programming and Scripting
Hi Team,
I am new to shell script and there is a requirement where files should be moved from Subfolder to parent folder.
Eg:
parent folder --> /Interface/data/test/IN
Sub folder -->/Interface/data/test/IN/Invoice20180607233338
Subfolder will be always with timestamp... (6 Replies)
Discussion started by: srivarun15
6 Replies
while(n) Tcl Built-In Commands while(n)
__________________________________________________________________________________________________________________________________________________
NAME
while - Execute script repeatedly as long as a condition is met
SYNOPSIS
while test body
_________________________________________________________________
DESCRIPTION
The while command evaluates test as an expression (in the same way that expr evaluates its argument). The value of the expression must a
proper boolean value; if it is a true value then body is executed by passing it to the Tcl interpreter. Once body has been executed then
test is evaluated again, and the process repeats until eventually test evaluates to a false boolean value. Continue commands may be exe-
cuted inside body to terminate the current iteration of the loop, and break commands may be executed inside body to cause immediate termi-
nation of the while command. The while command always returns an empty string.
Note: test should almost always be enclosed in braces. If not, variable substitutions will be made before the while command starts execut-
ing, which means that variable changes made by the loop body will not be considered in the expression. This is likely to result in an
infinite loop. If test is enclosed in braces, variable substitutions are delayed until the expression is evaluated (before each loop iter-
ation), so changes in the variables will be visible. For an example, try the following script with and without the braces around $x<10:
set x 0
while {$x<10} {
puts "x is $x"
incr x
}
SEE ALSO
break(n), continue(n), for(n), foreach(n)
KEYWORDS
boolean value, loop, test, while
Tcl while(n)