runhao chen
2014-09-15 07:36:13 UTC
hi
I got a question when I use sed, please refer to the log:
*******************************************************************beginning
of log
***@roger-T540p-Ubuntu:/home/roger/work/shell# cat emp.txt
100 Jason Smith
200 John Doe
what happened?!
300 Sanjay Gupta
400 Ashok Sharma
500 roger chen
***@roger-T540p-Ubuntu:/home/roger/work/shell# sed -n -i '3d' emp.txt
***@roger-T540p-Ubuntu:/home/roger/work/shell# cat emp.txt
***@roger-T540p-Ubuntu:/home/roger/work/shell#
*******************************************************************end of
log
I just want to delete the third line " what happened?!", and after the
command, all lines were deleted.
did it suppose to be ?
thank you for your time!
I got a question when I use sed, please refer to the log:
*******************************************************************beginning
of log
***@roger-T540p-Ubuntu:/home/roger/work/shell# cat emp.txt
100 Jason Smith
200 John Doe
what happened?!
300 Sanjay Gupta
400 Ashok Sharma
500 roger chen
***@roger-T540p-Ubuntu:/home/roger/work/shell# sed -n -i '3d' emp.txt
***@roger-T540p-Ubuntu:/home/roger/work/shell# cat emp.txt
***@roger-T540p-Ubuntu:/home/roger/work/shell#
*******************************************************************end of
log
I just want to delete the third line " what happened?!", and after the
command, all lines were deleted.
did it suppose to be ?
thank you for your time!
--
Best Regards,
Roger Chen
Best Regards,
Roger Chen