- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: how to extract from a 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
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
тАО03-22-2002 03:19 AM
тАО03-22-2002 03:19 AM
Re: how to extract from a file
I think Perl i will like Perl too much, it is a very human readable :-)))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2002 03:39 AM
тАО03-22-2002 03:39 AM
Re: how to extract from a file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2002 03:50 AM
тАО03-22-2002 03:50 AM
Re: how to extract from a file
FILE=MyLargeFile
lastSTRING=$( grep -n STRING $FILE | tail -1 | cut -f1 -d:)
from=$(expr $lastSTRING + 5)
tail -$from $FILE | head -19
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2002 04:06 AM
тАО03-22-2002 04:06 AM
Re: how to extract from a file
FILE=MyLargeFile
linesinfile$( wc -l $FILE) lastSTRING=$( grep -n STRING $FILE | tail -1 | cut -f1 -d:)
from=$(expr $lastSTRING + 6)
TAIL=$(expr $linesinfile - $from)
tail -$from $FILE | head -19
Regards,
Trond
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО03-22-2002 04:09 AM
тАО03-22-2002 04:09 AM
Re: how to extract from a file
Missing linefeed. This should be right:
FILE=MyLargeFile
linesinfile$( wc -l $FILE)
lastSTRING=$( grep -n STRING $FILE | tail -1 | cut -f1 -d:)
from=$(expr $lastSTRING + 6)
TAIL=$(expr $linesinfile - $from)
tail -$from $FILE | head -19
Regards,
Trond
- « Previous
-
- 1
- 2
- Next »