awk '{print $1}' /root/test
this command will print the first column from this file. Type print $2 to print second column
for i in `cat /root/test`;do cp /log/asterisk/monitor/monitor/$i /root/records/;done
this command will read names of files from the file /root/test and copy these files from /var/log/asterisk/monitor/monitor directory to the /root/records file
No comments:
Post a Comment