[ec2-user@ip ] cat charge |sort|uniq |wc -l
#########
#!bin/bash
ls -l *charge* |awk '{print $9}' > all_list.txt
all_charge_log='./all_list.txt'
rm -rf replace/*
for each_charge in `cat ${all_charge_log}`;do
cat ${each_charge} |sort|uniq > ./replace/${each_charge}
done
chown -R jenkins:jenkins replace/
/usr/bin/zip -r test.zip ./replace/charge.log
#########
2>&1 是将标准出错重定向到标准输出,这里的标准输出已经重定向到了out.file文件,即将标准出错也输出到out.file文件中
网友评论