How i'll delete a particular line from the file? Please give
answer as soon as possible. Thanks in advance.

Answer Posted / ranjan tikoo

If I have 10 lines in the file and I want to delete line 5
and 6 then use

sed '5,6 d' temp1.txt > temp2.txt

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is the general format of unix command syntax?

698


Is there any method to erase all files in the current directory, along with its all sub-directories, by using only one command?

595


What is a command and examples?

591


What is grep and how do you use it?

581


What is a bash command?

627






What is the difference between awk and grep?

561


why metadb requires a seperate slice to create Solaris volume manager

2558


What do chmod, chown, chgrp commands do?

642


Explain ‘library functions’ with respect to unix commands?

606


What are the differences among a system call, a library function, and a unix command?

571


Why is it called a shebang?

574


What will the following command do?

622


What is the use of tee command?

573


Who invented grep?

657


Name the general commands in using unix os for a beginner?

628