2012-10-14 4 views

답변

1

것을보십시오 :

그것은 빠릅니다
sed -i '1d;$d' ./files/to/edit/*.xml 

은 다음을 참조하십시오 비 GNU 또한 SED에

time find /usr/share/doc/x* | xargs -I% sed '1d' % && sed '$d' % 
real 0m0.611s 
user 0m0.033s 
sys 0m0.120s 

time find /usr/share/doc/x* | xargs -I% sed -e '1d' -e '$d' % 
real 0m0.613s 
user 0m0.027s 
sys 0m0.140s 


time find /usr/share/doc/x* | xargs -I% sed '1d;$d' % 
real 0m0.565s 
user 0m0.023s 
sys 0m0.140s 
+1

, 당신은'-e 1D -e '$ 디부' – Kevin

+0

추가 벤치 마크를 사용해야 할 수 있습니다 내 게시물에 –

+0

'time find/usr/share/doc/x * | xargs -I % sed -e '1d'-e '$ d'%'benchmark –

관련 문제