The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Shell Script for deleting the first line in a file badrimohanty Shell Programming and Scripting 3 06-18-2009 11:26 AM
shell script reqd - deleting files venkatesht Shell Programming and Scripting 2 12-19-2008 01:15 PM
Deleting column from a flatfile with delimiter rsprabha Shell Programming and Scripting 5 10-03-2008 04:18 AM
Urgent help required in deleting a line without opening a file usinga shell script naan Shell Programming and Scripting 6 07-20-2006 03:42 AM
shell script: deleting files from a directory onlyc Shell Programming and Scripting 1 07-09-2006 06:41 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #15 (permalink)  
Old 07-03-2009
Sumedha Sobti Sumedha Sobti is offline
Registered User
  
 

Join Date: Jul 2009
Location: India
Posts: 9
Hi,

Instead of counting the line number which has to be deleted and coming out of the file and then implementing it, you may try an easy way out.
This is an interactive way of deleting a line while reading the file:
1. Enter the file using say vi xx.txt
2. Esc and then press down arrow to reach the line to be deleted
3. Esc click DD (twice)
4. Line is removed

Regards,
Sumedha

Last edited by Sumedha Sobti; 07-05-2009 at 01:43 AM..
Sponsored Links
Reply

Bookmarks

Tags
sed, shell script, unix

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 04:51 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0