- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Script
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
Forums
Discussions
Discussions
Discussions
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
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
04-20-2004 03:55 PM
04-20-2004 03:55 PM
Script
I am giving my original script.
Script:
echo
echo ' \c'
tput smso
echo 'WARNING: Training Database ? '
tput rmso
echo ' Are U Sure [Y/N]: \c'
read reply
/data/xxxx/xxxxx/xxxxx
;;
In the above script,suppose i choose either yes or no then it will go to training database.
Pls modify the script for the below options,
Yes --> /data/xxxx/xxxxx/xxxxx
No ----> /usr/bin/xxxx
Regards,
M.Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 04:05 PM
04-20-2004 04:05 PM
Re: Script
case "${reply}" in
y|Y) /data/xxxx/xxxxx/xxxxx
;;
n|N) /usr/bin/xxxx
;;
*) echo "Bad Response;
;;
esac
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:05 PM
04-20-2004 05:05 PM
Re: Script
After modified the script, i got the following error.
Error:
script interpreter "/bin/sh" not found
script interpreter link resolves to "/usr/bin/sh"
/usr/bin/mfgmenu[34]: mfgdems: not found.
Pls guide to me .
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:06 PM
04-20-2004 05:06 PM
Re: Script
read reply
if [ "$reply" = "Y" -o "reply" = "y" ]
then
/data/xxxx/xxxxx/xxxxx
elif [ "$reply" = "N" -o "reply" = "n" ]
then
usr/bin/xxxx
else
echo " bad option "
fi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:11 PM
04-20-2004 05:11 PM
Re: Script
for e.g.
#!/usr/bin/sh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:13 PM
04-20-2004 05:13 PM
Re: Script
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:41 PM
04-20-2004 05:41 PM
Re: Script
#!/usr/bin/sh
Also Confirm your executable is present
In /usr/bin/mfgmenu script on 30th line see whether you have a path exported for mfgdems executable / script
Regds,
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 05:41 PM
04-20-2004 05:41 PM
Re: Script
#!/usr/bin/sh
echo
echo ' \c'
tput smso
echo 'WARNING: Training Database ? '
tput rmso
echo ' Are U Sure [Y/N]: \c'
read reply
if [ $reply = "y" -o $reply = "Y" ]
then
echo "Yes"
/data/xxxx/xxxxx/xxxxx
elif [ $reply = "n" -o $reply = "N" ]
then
echo "No"
/usr/bin/xxxx
else echo "Invalid"
fi
sks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 06:00 PM
04-20-2004 06:00 PM
Re: Script
#!/usr/bin/sh
TARGET=/data/xxxx/xxxxx/xxxxx
echo
echo ' \c'
tput smso
echo 'WARNING: Training Database ? '
tput rmso
echo ' Are U Sure [Y/N]: \c'
read reply
[[ $reply == "y" -o $reply == "Y" ]] && TARGET=/usr/bin/xxxx
$TARGET
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2004 06:06 PM
04-20-2004 06:06 PM
Re: Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 02:06 PM
04-21-2004 02:06 PM
Re: Script
I Have attached my full script.
Pls modify the script in 3rd switch for the below options,
Yes --> /data/xxxx/xxxxx/xxxxx
No ----> /usr/bin/xxxx
Thanks,
M.Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 04:53 PM
04-21-2004 04:53 PM
Re: Script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 05:35 PM
04-21-2004 05:35 PM
Re: Script
Can u go through this following link please I think u r new here.
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=140137
Kaps
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-21-2004 05:47 PM
04-21-2004 05:47 PM
Re: Script
Attaching the modified script
Regards,
Santosh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 03:21 PM
04-22-2004 03:21 PM
Re: Script
I am sending the same script,pls modify the below options,
Yes ---> /data/xxxx/xxxxx
No ----> 0) exit i.e last switch in my script
Pls modify this script.
Thanks,
Suresh.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 08:13 PM
04-22-2004 08:13 PM
Re: Script
It will always be better not to depend on other's but take their advise and action ur selves....
Your script is a very simple shell script. Let's see what it does ..
Check what is read in "x" variable
if x is
1). Execute /xxx/xxxclst
2). Execute /xxx/xxxclst
3). Read another variable and check it is "y" or "N" and if
Y). Execute /xxxx/xxxx/xxxx/
N). Exit
4). Execute /xx/xx/xxx
5). Execute passwd
6). Execute exit
To achieve what u need in 3'rd condition,
You have to add the following lines just after
echo ' Are U Sure [Y/N]: \c'
read REPLY
case $REPLY in
Y) /xxxx/xxxx/xxxx/ ;;
N) exit 8 ;;
esac
;;
4) .... Continue with the same script
Regds,
Kaps
Note : People spend lots of time on ur requests did u get a chance to look at the URL on my last query and assign some rewards ?.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 08:23 PM
04-22-2004 08:23 PM
Re: Script
Kapil is right.
I think u need to take look at two aspects.
Your Action / Rewards.
I my self feel very pleasing if anybody helps me when i am in problem.
Bharat
** Go thr' the link suggested
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 09:48 PM
04-22-2004 09:48 PM
Re: Script
Thanks, I findout that problem, the problem was syntex problem.Now it's working fine.
thanks,
Suresh
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-22-2004 10:00 PM
04-22-2004 10:00 PM
Re: Script
I can not believe that ur script worked and it was just a syntax problem ! Your script needs correction from my view it is missing a case /if loop which I have pointed out.
Kaps