- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- How to Manipulate Text File
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
11-19-2003 04:47 PM
11-19-2003 04:47 PM
970 /etc/hosts
976 /etc/passwd
980 SO122310000123
Thanks in advanced for your help.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 04:53 PM
11-19-2003 04:53 PM
Re: How to Manipulate Text File
File xt to look like as follows?
970 /etc/hosts
976 /etc/passwd
980 SO122310000123
Post.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 05:03 PM
11-19-2003 05:03 PM
Re: How to Manipulate Text File
970 /etc/hosts
976 /etc/passwd
980 SO122310000123
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 05:10 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 05:57 PM
11-19-2003 05:57 PM
Re: How to Manipulate Text File
awk '
started==1 { print $4,$5 }
$1 == "Rank" { started=1 }
'
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 06:54 PM
11-19-2003 06:54 PM
Re: How to Manipulate Text File
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 07:00 PM
11-19-2003 07:00 PM
Re: How to Manipulate Text File
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 07:03 PM
11-19-2003 07:03 PM
Re: How to Manipulate Text File
(I can be mistaken in the numbers, but something like this should work)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-19-2003 07:11 PM
11-19-2003 07:11 PM
Re: How to Manipulate Text File
try this simple approach, using xt as $1:
#!/usr/bin/sh
while read a b c d e f g
do
echo $b | grep -q pinguin@localhost
if [ $? = 0 ]
then
echo $d $e
fi
done <$1
regards,
John K.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-21-2003 06:28 AM
11-21-2003 06:28 AM
Re: How to Manipulate Text File
sed -n "7,$ p" x | cut -c41-66
Enjoy,
-dlt-