HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- delete line
Operating System - HP-UX
1833730
Members
2332
Online
110063
Solutions
Forums
Categories
Company
Local Language
back
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
back
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
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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
05-13-2005 09:30 PM
05-13-2005 09:30 PM
delete line
hi all
how can i delete lines from the fisrt file
to specefic line in this file?
EX:
********************
1111111
2222222
333 hello 3333
4444444
********************
i wnat to delete lines from first line to
line contain word "hello"
many thanks
how can i delete lines from the fisrt file
to specefic line in this file?
EX:
********************
1111111
2222222
333 hello 3333
4444444
********************
i wnat to delete lines from first line to
line contain word "hello"
many thanks
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2005 10:14 PM
05-13-2005 10:14 PM
Re: delete line
HI,
Open the file using vi editor,
Two methods:
i) Go to the line upto which you want to delete, and enter following command:-
:1,.d
ii) Find out the line no. of the last line you want to delete, in the above example, hello comes in 3rd line, so enter following command:
:1,3d
Hope this clarifies,
Regards
Open the file using vi editor,
Two methods:
i) Go to the line upto which you want to delete, and enter following command:-
:1,.d
ii) Find out the line no. of the last line you want to delete, in the above example, hello comes in 3rd line, so enter following command:
:1,3d
Hope this clarifies,
Regards
What we cannot speak about we must pass over in silence.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2005 10:45 PM
05-13-2005 10:45 PM
Re: delete line
many thanks for response
iam sorry
i forget to tell u .i want to use sed command
because this procedure is step in my script file.
please help
iam sorry
i forget to tell u .i want to use sed command
because this procedure is step in my script file.
please help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-13-2005 10:57 PM
05-13-2005 10:57 PM
Re: delete line
sed '1,/hello/d'
will delete from the 1st line to line containing "hello" (inclusive).
will delete from the 1st line to line containing "hello" (inclusive).
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP