|
发表于 2006-9-25 10:05:05
|
显示全部楼层
Post by ares99999
ls -l --full-time > tmp
tr -s ' ' ' ' < tmp > tmpp
cut -d ' ' -f 6,9 tmpp > tmp
sed 's/-//g' tmp > tmpp
mv tmpp tmp
declare -i time
cat tmp | while read time filename
do
if [ "$time" -ge 20050201 ]
then
if [ "$time" -le 20060201 ]
then
printf "%s\n" "$filename"
fi
fi
done
我觉得可以简化下,第一次写shell,多指教。
程序可以正确运行
cat tmp | while read time filename
请教一下,这句的意思是不是将tmp内中的第一列内容赋于time,第二列赋于filename ? |
|