- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Awk expert's help needed (how to edit a text f...
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
тАО06-09-2005 02:43 AM
тАО06-09-2005 02:43 AM
Re: Awk expert's help needed (how to edit a text file?)
in line 18 and after, only add the phrase (" /work/" to the beginning of the line if the line contains the phrase "htm".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2005 03:59 AM
тАО06-09-2005 03:59 AM
Re: Awk expert's help needed (how to edit a text file?)
ex file <
g/htm/s/^/work/
0pu f
wq
EOS
live free or die
harry d brown jr
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2005 04:01 AM
тАО06-09-2005 04:01 AM
Re: Awk expert's help needed (how to edit a text file?)
I don't have a choice.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2005 04:48 AM
тАО06-09-2005 04:48 AM
Re: Awk expert's help needed (how to edit a text file?)
HTH
-- Rod Hills
PS - even small points to previous posts is a way to acknowledge the effort by the poster.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-09-2005 05:31 AM
тАО06-09-2005 05:31 AM
Re: Awk expert's help needed (how to edit a text file?)
my solution:
awk '{if (NR>=18 && match($0,"htm")) print "/work/" $0; else print}'
Best regards.
Frank.
P.D I think the last reply by Rodney Hills does not work properly because the awk script only prints lines with /htm/ pattern and does not print lines without this pattern.
- « Previous
-
- 1
- 2
- Next »