由买买提看人间百态

boards

本页内容为未名空间相应帖子的节选和存档,一周内的贴子最多显示50字,超过一周显示500字 访问原贴
Unix版 - How to remove a line from a file?
相关主题
unix commands question帮帮忙,用C作一个SHELL
再次急问: *.tgz 文件怎么解?为什么我就是不会写Shell script?
Re: 怎么在UNIX下面放CD?What's the quickest way to change various filenames with same format under unix?
books about advanced UNIX commandUNIX dummy Questions?
在unix下怎么听CD亚[转载] The truely evil UNIX command. :-)
[转载] how to see which port in use?如何显示出“*”
A Unix questionhow to rsh NT from unix
pine中的中文输入问题举一反三学UNIX
相关话题的讨论汇总
话题: myfile话题: remove话题: line话题: file话题: unix
进入Unix版参与讨论
1 (共1页)
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...
1 (共1页)
进入Unix版参与讨论
相关主题
举一反三学UNIX在unix下怎么听CD亚
555...问个土问题[转载] how to see which port in use?
Is there any method to cancel the command "rm filA Unix question
如何看某个端口是否被占用?(use UNIX command or ..)pine中的中文输入问题
unix commands question帮帮忙,用C作一个SHELL
再次急问: *.tgz 文件怎么解?为什么我就是不会写Shell script?
Re: 怎么在UNIX下面放CD?What's the quickest way to change various filenames with same format under unix?
books about advanced UNIX commandUNIX dummy Questions?
相关话题的讨论汇总
话题: myfile话题: remove话题: line话题: file话题: unix