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 command is used to check the current users?

767


What does the command ' $who | sort –logfile > newfile' do?

1007


What is sed awk grep?

811


How can we use grep command in unix?

819


Which command is used to find whether the system is 32 bit or 64 bit?

811






What is rmdir command?

778


Which unix command lists files/folders in alphabetical order?

1011


What is the difference between awk and grep?

782


What is awk good for?

787


How to use grep command to list find the records of a file containing 10 different strings?

827


What is the pipe command?

800


Explain ‘system calls’ with respect to unix commands?

768


Which command is used to kill the last background job?

992


What does find command return in unix?

829


What command will change your prompt to myprompt?

899