文件:
/home/USER/DIR/a
http://www.here.is.a.hyper.link.net/
/home/USER/DIR/b
http://www.here.is.another.hyper.link.net/
是否需要删除此文件中的所有奇数行(
PUBLIC-DIRECTORY-LIST
)?它可以在以下我的批处理脚本中找到(投递箱批处理puburl创建者):for PATH in `cat LIST`
do
echo $PATH
dropbox puburl $PATH
done > PUBLIC-DIRECTORY-LIST
我是否只将命令附加到脚本末尾的prune
PUBLIC-DIRECTORY-LIST
上? 最佳答案
# awk 'NR%2==0' file
http://www.here.is.a.hyper.link.net/
http://www.here.is.another.hyper.link.net/
关于linux - 删除文本文件中的奇数行,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/1612396/