- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Basic HPUX Question
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
тАО09-24-2002 08:26 AM
тАО09-24-2002 08:26 AM
Basic HPUX Question
the functions "sort" or "join" can do this, but can't figure out how.
Thanks in advance to anyone who can answer this question or lead me in the right direction.
Mark
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2002 08:32 AM
тАО09-24-2002 08:32 AM
Re: Basic HPUX Question
See 'paste'.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2002 08:35 AM
тАО09-24-2002 08:35 AM
Re: Basic HPUX Question
take out one coloumn from the file ABC and "paste" the file ABC to XYZ.
Sandip
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2002 09:02 AM
тАО09-24-2002 09:02 AM
Re: Basic HPUX Question
join -j1 1 -j2 1 -o1.1,1.2,2.2 ABC XYZ >NEWXYZ
Should work for you. This assumes blank or tab is the field seperator.
Use -t: if you wanted to use ":" as seperator.
Use -a2 to send unmatched lines to STDERR.
Hope this helps
-- Rod Hills
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2002 11:43 AM
тАО09-24-2002 11:43 AM
Re: Basic HPUX Question
paste is the most easy if the same line numbers in the two files shall be matched. In other cases (and if it is a one to many matching relation you have to use join). Note , if using join the files need to be sorted on the matching column.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2002 05:17 PM
тАО09-24-2002 05:17 PM
Re: Basic HPUX Question
Assuming tab as the deliminator, do this :
paste XYZ ABC | cut -f 1,2,4 > JOINED
Use the -d option to specify deliminator if tab is not the correct one. man cut for more information.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-24-2002 11:20 PM
тАО09-24-2002 11:20 PM
Re: Basic HPUX Question
You can combine the files as follows:
pr -m -t -s' ' XYZ ABC | awk '{ print $1, $2, $4 }'
Cheers,
Joseph.