j*****g 发帖数: 37 | 1 Is there some small UNIX command that can do this?
Like this,
%removeline -n 5 myfile
will remove line 5 from file 'myfile'
Thanks, |
B*Q 发帖数: 36 | 2 write a script to do this bah
【在 j*****g 的大作中提到】 : Is there some small UNIX command that can do this? : Like this, : %removeline -n 5 myfile : will remove line 5 from file 'myfile' : Thanks,
|
c*****t 发帖数: 1879 | 3 sed is the easily command doing this job...
【在 B*Q 的大作中提到】 : write a script to do this bah
|
i***f 发帖数: 10 | 4 head and tail commands look straigt forward:
head -n 4 myfile >temp; tail -n +6 myfile >>temp; mv -f temp myfile
anyone can simplify the above 3 commands into only one?
【在 c*****t 的大作中提到】 : sed is the easily command doing this job...
|