- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Executing 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
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-07-2006 03:18 PM
тАО02-07-2006 03:18 PM
But when I try to run srcipt
./scriptname.sh
command inside the script doesnt execute
what should I do to overcome that problem?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 03:23 PM
тАО02-07-2006 03:23 PM
Re: Executing script
Are you using relative path or just command names inside the script ? Try to use full path instead of relative paths. Just like,
# print_manifest
Instead, use
$ /opt/ignite/bin/print_manifest
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 03:28 PM
тАО02-07-2006 03:28 PM
Re: Executing script
It takes no effect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 03:34 PM
тАО02-07-2006 03:34 PM
Re: Executing script
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 03:34 PM
тАО02-07-2006 03:34 PM
Re: Executing script
Whether the special user has execute permission for that script?
Regards
CS
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 03:44 PM
тАО02-07-2006 03:44 PM
Re: Executing script
echo 123qwe
ll
Both commands are executing successfully from the command line.
Script has the following permissions
-rwxr-xr-x 1 oraslv dba 35 Feb 7 17:20 11.sh
I try to run script under oraslv
Unfortunately I cant do that yet
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 03:45 PM
тАО02-07-2006 03:45 PM
Re: Executing script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:05 PM
тАО02-07-2006 04:05 PM
Re: Executing script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:08 PM
тАО02-07-2006 04:08 PM
Re: Executing script
Which shell you execute ? Also, Can you do this,
$ ./script.sh 2>&1 out
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:11 PM
тАО02-07-2006 04:11 PM
Re: Executing script
kate:oraslv> 11.sh 2>&1 out
kate:oraslv>
no result
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:14 PM
тАО02-07-2006 04:14 PM
Re: Executing script
kate:oraslv> more 11.sh
#!/usr/bin/sh
echo 123
ls
kate:oraslv>
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:17 PM
тАО02-07-2006 04:17 PM
Re: Executing script
everything works normally
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:18 PM
тАО02-07-2006 04:18 PM
Re: Executing script
Try to assign points to people who responded you.
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:32 PM
тАО02-07-2006 04:32 PM
Re: Executing script
helps.
That means you have written the script in a form not understood by sh.
So do you want to keep this line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:57 PM
тАО02-07-2006 04:57 PM
Re: Executing script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 04:57 PM
тАО02-07-2006 04:57 PM
Re: Executing script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 05:09 PM
тАО02-07-2006 05:09 PM
Re: Executing script
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 05:13 PM
тАО02-07-2006 05:13 PM
Re: Executing script
#!/usr/bin/sh
echo 123
ls
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 05:20 PM
тАО02-07-2006 05:20 PM
Re: Executing script
#!/usr/bin/sh
echo "123"
ls -l
#
# chmod u+x script.sh
# sh -x ./script.sh
what are you getting here?
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 05:32 PM
тАО02-07-2006 05:32 PM
Re: Executing script
# which sh
# ls -l /usr/bin/sh
May be /usr/bin/sh file is having a problem. Use like, /sbin/sh instead of /usr/bin/sh. It is better that we can use that script of single user environment if it is possible with script lines using /sbin/sh.
Try as,
#!/sbin/sh
echo "123"
ls
Execute now.
--
Muthu
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 05:39 PM
тАО02-07-2006 05:39 PM
Re: Executing script
thanx to all
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-07-2006 06:03 PM
тАО02-07-2006 06:03 PM
Re: Executing script
You can close this thread.
-Arun