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
06-05-2006 10:46 PM
06-05-2006 10:46 PM
vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 10:49 PM
06-05-2006 10:49 PM
Re: vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 10:52 PM
06-05-2006 10:52 PM
Re: vi
You can easily do with "sed"
# sed '1,10d'
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 10:52 PM
06-05-2006 10:52 PM
Re: vi
can you also please read:
http://forums1.itrc.hp.com/service/forums/helptips.do?#28
and rewarad the answers to your previous questions and close the threads:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1031491
and
http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=1031131
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 11:15 PM
06-05-2006 11:15 PM
Re: vi
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 11:21 PM
06-05-2006 11:21 PM
Re: vi
# delete the last 10 lines of a file
sed -e :a -e '$d;N;2,10ba' -e 'P;D' # method 1
sed -n -e :a -e '1,10!{P;N;D;};N;ba' # method 2
-Amit
PS: Don't forget to assign points to the answers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 11:39 PM
06-05-2006 11:39 PM
Re: vi
sed '1,10d' means it will delete lines from 1 to 10.
and redirect the output to a different file , that will be your target file.
Also here is a sed FAQ that may help to understand further:
http://www.faqs.org/faqs/editor-faq/sed/
Cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-05-2006 11:42 PM
06-05-2006 11:42 PM
Re: vi
Here is your profile :
I have assigned points to 0 of 15 responses to my questions.
Try to make it 15 of 15 and make your forum profile better. Remeber to assign points to them , who are trying to help you.
hth,
Raj.
( * 0 point please. )
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-06-2006 11:38 PM
06-06-2006 11:38 PM
Re: vi
this perl one-liner command will delete the first 10 lines in 'file' saving in the meanwhile the 'file' as 'file.old':
perl -i.old -ne 'print unless 1 .. 10' file
HTH,
Art
N.B. Please assign points!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2006 12:42 AM
06-07-2006 12:42 AM
Re: vi
And any other user that looks at the responses does not know which one is good, and which one is bad. Why? Because all of the points are unassigned.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2006 03:23 AM
06-07-2006 03:23 AM
Re: vi
I agre with Steve please spend their valuable time helping out and the best way to show the appreciation would be to assign points.
0 out of 18
Rgds
HGN
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-07-2006 03:23 AM
06-07-2006 03:23 AM
Re: vi
I agre with Steve please spend their valuable time helping out and the best way to show the appreciation would be to assign points.
If this issue is resolved you can assign points and close this thread
0 out of 18
Rgds
HGN