Solved

How delete particular line with out opening file?

Posted on 2008-06-18
2
718 Views
Last Modified: 2013-12-27
How delete particular line with out opening file,say i want to delete line number 2 in a file with out using vi.
0
Comment
Question by:umeshexp
  • 2
2 Comments
 
LVL 40

Accepted Solution

by:
omarfarid earned 125 total points
Comment Utility
try

sed '2 d' file > file.$$
mv file.$$ file
0
 
LVL 40

Expert Comment

by:omarfarid
Comment Utility
why B grade :|
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Hello fellow BSD lovers, I've created a patch process for patching openjdk6 for BSD (FreeBSD specifically), although I tried to keep all BSD versions in mind when creating my patch. Welcome to OpenJDK6 on BSD First let me start with a little …
In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now