All,
could some one help me with this script please? I am having a 'senior moment' lol.
Ok so I have a nfs.sh file that I run. It mounts the nfs shares when I want them.
But if some of the shares are not available (machine not on), then I have to wait until it times out on that share.
What I want to have is a script that will ask something like (A)ll?, (b) main shares, (c) other desktops, (d) nas shares. (not that exact wording but you get the idea.
Then I can run this when wanted and choose which shares I want.
Yes I could put the mounts in Fstab but I prefer to have then as a separate script.
Having my senior moment about the basic' menu bit'.
Alan
Help with a simple bash script please
Forum rules
Topics in this forum are automatically closed 6 months after creation.
Topics in this forum are automatically closed 6 months after creation.
Help with a simple bash script please
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Re: Help with a simple bash script please
One of many possibilities:
Code: Select all
echo "Which shares to mount?"
select yn in "All" "Main"; do
case $yn in
"All")
echo "Mounting all shares..."
break;;
"Main")
echo "Mounting main shares..."
break;;
esac
done
Re: Help with a simple bash script please
Thanks just what I needed. Just got a mental block over it for some reason.
Alan
Alan