i need to write a scipt which is based on a for loop. Within the for loop i require most of the script such as if statements and also a while loop.
The problem is when a if statement is reached i.e the RC is nto equal to 1 . I want the current loop to exit and then for it to start the next loop.
an example is
A+, N+, CCNA, CCSA, SNPA
- Keeping You in the Know
The problem is when a if statement is reached i.e the RC is nto equal to 1 . I want the current loop to exit and then for it to start the next loop.
an example is
Code:
for i in `ls`
do
mv -f $i /tmp
if [ $? ! 0 ]
then
exit 1
else
Echo $i moved to /tmp
fi
done
A+, N+, CCNA, CCSA, SNPA
- Keeping You in the Know