- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Need Help with command
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
Forums
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
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
05-31-2008 01:36 PM
05-31-2008 01:36 PM
Trying to sort the files under "/dev" and running the following command and it's not working. What am I doing incorrect.
ll /dev/*/group | awk '(printf $6 "\n")' | sort -n
I am doing this to find out what is the next number I can use for mknod command.
Thanks in advance!
MP
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2008 01:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2008 02:17 PM
05-31-2008 02:17 PM
Re: Need Help with command
The -k option of sort is very powerful. Character or numeric sorting covers the hex nature of the minor number
If you want to be more specific
ll /dev/*/group | sort -k6.3,6.4
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2008 02:56 PM
05-31-2008 02:56 PM
Re: Need Help with command
Thanks for the quick reply. Both of you guys are de "MAN".
It is always help having the right syntax in the command.
This one gives me what I was looking for and it's easy to determine which next "HEX" number I can use for my MKNOD.
Appreciate your help.
THX - MP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-31-2008 05:01 PM
05-31-2008 05:01 PM
Re: Need Help with command
Instead of using awk's printf, you could just use: print $6
You could also print the filename.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2008 06:47 AM
06-02-2008 06:47 AM
Re: Need Help with command
I had the same command line and the option that you suggested does not work.
Thanks for your help.
Thanks,
MP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2008 06:49 AM
06-02-2008 06:49 AM
Re: Need Help with command
thanks for your help. The only command works is James and TTr's.
Thanks for your help.
Thanks,
MP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-02-2008 02:51 PM
06-02-2008 02:51 PM
Re: Need Help with command
Sorry, I was copying your line and just suggesting you not use printf. I didn't notice you had () vs {}.
So here would be my suggestion combining the JRF and my filename solutions:
ll /dev/*/group | awk '{print $6,$10}' | sort