Hi Team,
I wrote a shell script in which it should repeat a process untill it satisfies the condition using the for loop i wrote the script, my question how can i make sure the process is repeating till the conditions are met.
Regards
Kanna
shell doubt of for
-
- Posts: 1522
- Joined: 2014/05/21 20:16:00
- Location: Central New York, USA
Re: shell doubt of for
Throw an echo or print of your test value into the loop to see it changing as it runs?
A Google for bash scripts returned this, and many others
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
A Google for bash scripts returned this, and many others
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO.html
-
- Posts: 2019
- Joined: 2015/02/17 15:14:33
- Location: Bulgaria
- Contact:
Re: shell doubt of for
I would use a while script:
Or an 'until':
Code: Select all
while true
do
echo test
done
Code: Select all
until [ "$VARIABLE1" -lt "1" ]
do
echo test
done