【发布时间】:2010-12-09 09:40:27
【问题描述】:
文件:
/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) 中的所有奇数行吗?它适用于我的批处理脚本,可以在下面找到(Dropbox 批处理 puburl 创建者):
for PATH in `cat LIST`
do
echo $PATH
dropbox puburl $PATH
done > PUBLIC-DIRECTORY-LIST
我是否只是将命令附加到脚本末尾的 prune PUBLIC-DIRECTORY-LIST?
【问题讨论】:
-
我仍然非常了解批处理脚本 - 我的第一个脚本 XD。
-
不要像这样对 cat 使用 for 循环...因为以后会出现空格问题。使用 while 读取循环
标签: linux text sed awk dropbox