1.txt 内容
my
you
123
12321
写个rm -rf /home/文本内的文件名
让他循环删除文本内的文件名
1
sagrada 2015-05-07 17:48:16 +08:00
while read line ; do
echo $line done < $file |
2
yetone 2015-05-07 17:55:41 +08:00
cat 1.txt | xargs -i rm -rf /home/{}
|
3
yetone 2015-05-07 17:58:54 +08:00
BTW, rm -rf 要慎用 = =
|
4
phx13ye 2015-05-07 17:58:59 +08:00
lines=`cat 1.txt`
for i in lines; do echo $i;done |
5
illuz 2015-05-07 19:12:43 +08:00 1
不怕有空行然后把 home 目录都删了吗
|
6
Csineneo 2015-05-07 19:30:34 +08:00
eval `sed 's#^#rm -rf /home/#' 1.txt`
|
7
nicai000 2015-05-07 19:33:21 +08:00
IFS=$'\n'
for orig in `cat foo.txt` do blah done |
9
holinhot OP |