- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: for loop processing problem
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
тАО08-13-2004 02:54 AM
тАО08-13-2004 02:54 AM
I am doing some processing against the /home
directory for certain users and am having an error I'm not sure how to resolve..
I'm entering:
cd /home
for user in tupz* u* dis*; do echo $user; done
The output from this command return:
tupzab4
tupzhb6
tupzjmb
ual001
ubs000
ucb006
uck002
udf003
uds003
dis*
If it doesn't find a user starting with "dis" as in this case, it tries to process a user called: "dis*"
Is there anything I can do to eliminate this
problem???
Thanks
dis*
[root@us1lxmgt01 /home]#
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2004 02:58 AM
тАО08-13-2004 02:58 AM
Re: for loop processing problem
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2004 03:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2004 03:29 AM
тАО08-13-2004 03:29 AM
Re: for loop processing problem
ll /home/ | grep -E '^d' | grep -E ' tupz[^*]|u[^*]|dis[^*] '
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-13-2004 03:51 AM
тАО08-13-2004 03:51 AM
Re: for loop processing problem
A possibile solution to prevent "dis*" from being processed, is to add the following after the "for" command-
if [[ $user != ${user%%\*} ]] ; then continue ; fi
This if statement tests $user to see if it ends with a "*". If so then skip it.
HTH
-- Rod Hills