- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- shell assignment doesn't work
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
тАО06-03-2002 07:42 AM
тАО06-03-2002 07:42 AM
mountPoint="/mnt_simple"
Does anyone know why the following line doesn't work?
myFstyp=`mount -p | grep "$mountPoint " | awk '{print $3}'`
echo "fstype = $myFstyp" # doesn't display anything
While, if I execute the above line on the command prompt, it works fine....
Any ideas?
Thanks a lot!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2002 07:48 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2002 07:48 AM
тАО06-03-2002 07:48 AM
Re: shell assignment doesn't work
From what you are saying, it sounds like you are running this out of cron or something.
at the top of your script:
PATH=/usr/bin:/sbin:/usr/sbin
export PATH
or state the absolut path of every command you execute.
Hope I understood you correctly
Chris
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2002 07:49 AM
тАО06-03-2002 07:49 AM
Re: shell assignment doesn't work
mountPoint="/mnt_simple"
export mountPoint
myFstyp=`/sbin/mount -p | grep "$mountPoint " | awk '{print $3}'`
Piyush
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2002 08:11 AM
тАО06-03-2002 08:11 AM
Re: shell assignment doesn't work
try this
mountPoint="/mnt_simple"
export myFstyp=`/usr/sbin/mount -p | grep "$mountPoint " | awk '{print $3}'`
This should the the parameter correctly
Manoj Srivastava
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-03-2002 11:26 AM
тАО06-03-2002 11:26 AM
Re: shell assignment doesn't work
Like they have said, use fstyp.
BUT, I tried your example (with a different mount point) and it works fine.
what does:
mount -p | grep "$mountPoint " | od -bc
return??
live free or die
harry