[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
a question of sed
From: |
runhao chen |
Subject: |
a question of sed |
Date: |
Mon, 15 Sep 2014 00:36:13 -0700 |
hi
I got a question when I use sed, please refer to the log:
*******************************************************************beginning
of log
address@hidden:/home/roger/work/shell# cat emp.txt
100 Jason Smith
200 John Doe
what happened?!
300 Sanjay Gupta
400 Ashok Sharma
500 roger chen
address@hidden:/home/roger/work/shell# sed -n -i '3d' emp.txt
address@hidden:/home/roger/work/shell# cat emp.txt
address@hidden:/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
- a question of sed,
runhao chen <=