- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- grep user information
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
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
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
09-25-2015 10:31 PM
09-25-2015 10:31 PM
grep user information
HI
I need to get user information like
username,account status,shell,gecos,passwd expiry staus .
I was not able to get all in a single command.
i need to take it for more thn 300 servers.
Is there any way to get those.
I ws able to get above information from passwd -sa and cat /etc/passwd file
but I need to merge bth output in a single command.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-26-2015 03:22 AM
09-26-2015 03:22 AM
Re: collect user information
If you know how to get the info from the two commands, you can just write a script that combines the output.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2015 11:37 AM
09-30-2015 11:37 AM
Re: collect user information
Hi
I used this command to merge the output, but I was not successfull.
{ command1 & command2; }
could you help me in merging the outputs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-30-2015 11:13 PM
09-30-2015 11:13 PM
Re: collect user information
>{ command1 & command2; }
This will run the first in the background.
If these two commands produce one line of output for one user, you can simply use:
{ command1; command2; }
If these two commands produce output for multiple users then you need to merge the info from each, provided there are a fixed number of lines for one command.
If files are sorted and one line each and the "key" is first, you can use join(1).