- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: while loop
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2005 07:33 AM
тАО02-11-2005 07:33 AM
echo -n "Please enter the number of physcial extents for the vgcreate (4,8,16, etc): "
read pe
for i in 2 3 4 5 6
do
echo "...Creating volume group vg0$i..."
vgcreate -s $pe $i `cat $target_dir/vg0$i.out`
done
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2005 07:49 AM
тАО02-11-2005 07:49 AM
Re: while loop
after this add
if [ ${pe} -eq "4" -o ${pe} -eq "8" -o ${pe} -eq "16" -o ${pe} -eq "32" ];then
for i in 2 3 4 5 6
do
echo "...Creating volume group vg0$i..."
vgcreate -s $pe $i `cat $target_dir/vg0$i.out`
done
else
echo "bad Choice"
exit 1
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2005 07:49 AM
- Tags:
- case
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2005 07:54 AM
тАО02-11-2005 07:54 AM
Re: while loop
Clay, but I need for it to loop back to another response. Is there a command I can put in after the "Invalid Choice"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2005 08:44 AM
тАО02-11-2005 08:44 AM
Re: while loop
OK=0
until [[ ${OK} -ne 0 ]]
do
read pe
case "${pe}" in
4|8|16|32) OK=1
;;
*) echo "Invalid input" >&2
;;
esac
done
for i ....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-11-2005 08:49 AM
тАО02-11-2005 08:49 AM