![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| awk continue | anhtt | Shell Programming and Scripting | 3 | 03-11-2008 12:08 PM |
| continue example | xramm | Shell Programming and Scripting | 7 | 07-03-2007 03:10 AM |
| Continue an 'scp' tranfser? | deckard | UNIX for Advanced & Expert Users | 3 | 12-19-2005 05:08 PM |
| continue the suspended jobs | killerserv | UNIX for Advanced & Expert Users | 6 | 01-10-2002 03:09 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Will the continue function work ????
I have written a script which does a following functions:-
1) Check a area if it is mounted or not 2) If the area is not mounted it will prompt the user to mount the are. 3) Once the area is mounted and the option is given as Y or y the script continues... My question is will the below script function properly with the above condition. I am not sure of the continue option. ========================== umount_snap() { $ECHO "Umounting online $SNAPSHOT" $FUSER -cku $SNAPSHOT $JFSUMOUNT $SNAPSHOT if [ $? -eq 0 ] then echo "success ..." else echo "error .." fi } check_mount() { $BDF |$GREP $SNAPSHOT if [ $? -eq 0 ] then umount_snap else $ECHO "The $SNAPSHOT is not mounted pls mount the same : \c" $ECHO "Do you want to continue : Y/N " read key if [ "$key" = "Y" -o "$key" = "y" ] then continue else exit 1 fi fi } SNAPSHOT=/snapshot/tan ECHO=/usr/bin/echo FUSER=/usr/bin/fuser JFSUMOUNT=/TEST/UCS/CONTROL/scripts/jfsumount RM=/usr/bin/rm BDF=/usr/bin/bdf ## Main script starts here check_mount |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|