- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Re: Found a word
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
тАО11-28-2005 08:04 PM
тАО11-28-2005 08:04 PM
Re: Found a word
We just want lines containing 2/6
Surround ARASW the only characters
are ( and )
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2005 08:11 PM
тАО11-28-2005 08:11 PM
Re: Found a word
# cat file1
2/6 ARASW25 TOTO tutu
(ARASW26) 2/6 TOTO xyz 12/x
tutu yy uu 6/8 ARASW56 titi fff
# grep "2/6" file1 | grep '^(ARASW[^ ]*)'
(ARASW26) 2/6 TOTO xyz 12/x
If it is not the requirement revert with more details.
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2005 09:14 PM
тАО11-28-2005 09:14 PM
Re: Found a word
Please try the second solution I posted above. Based on your input, in my opinion, it *does* give you exactly the output for which you asked.
Cut-and-paste the script I posted in my *second* post, name it "perl.pl" and call it like:
# ./perl.pl 2/6 yourfile
The first argument (for example, 2/6, tells that you only want to find lines with this token in them.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2005 09:41 PM
тАО11-28-2005 09:41 PM
Re: Found a word
# grep $MODPORT fic | awk '{ for (i=1;i
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-28-2005 09:54 PM
тАО11-28-2005 09:54 PM
Re: Found a word
sed -e "/2\/6/!d;s/.*\(ARASW[^) ]*\).*/\1/;"
hth.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-29-2005 04:52 AM
тАО11-29-2005 04:52 AM
Re: Found a word
Based on your reply here's the complete awk construct...
# awk '$0~/ 2\/6 /||$0~/^2\/6 /||$0~/ 2\/6$/{print substr($0,match($0,/ARASW/),7)}'
cheers!
- « Previous
-
- 1
- 2
- Next »