- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Scripting Issue
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-21-2011 04:24 AM
тАО02-21-2011 04:24 AM
Please help on the scripting issue below:
[root@sihp8039:/var/opt/soeg/rpt]
# MSGMSG="21 - /var/opt/secu/log/root/* access is protected"
[root@sihp8039:/var/opt/soeg/rpt]
# echo $MSGMSG
21 - /var/opt/secu/log/root/remsh.log /var/opt/secu/log/root/su.log access is protected
That is not what I want. My expected output result as below.
# echo $MSGMSG
21 - /var/opt/secu/log/root/* access is protected
How to get that's output?
Thanks and Regards,
Negara
Solved! Go to Solution.
- Tags:
- quoting
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2011 04:36 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2011 05:01 AM
тАО02-21-2011 05:01 AM
Re: Scripting Issue
Thanks for help. If I use "set -f", how to enable back the filename generation?
[root@sihp8039:/root]
# set -f
[root@sihp8039:/root]
# MSGMSG="21 - /var/opt/secu/log/root/* access is protected"
[root@sihp8039:/root]
# echo $MSGMSG
21 - /var/opt/secu/log/root/* access is protected
Thanks and Regards,
Negara
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2011 05:07 AM
тАО02-21-2011 05:07 AM
Re: Scripting Issue
Please try "set +f"
Rgds
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2011 05:14 AM
тАО02-21-2011 05:14 AM
Re: Scripting Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО02-21-2011 10:58 AM
тАО02-21-2011 10:58 AM
Re: Scripting Issue
It is easier to quote it than to turn off globbing:
echo "$MSGMSG"
Another reason for quoting is to maintain multiple spaces.