#!/bin/bash
for k in `cat errlog_tmp.txt`;
do
arr=( $(find . -name "$k*" -type f));
echo $arr;( cp $arr "./error1$k");
done;
Above shell will cat file names in "errlog.txt" and find in the current directories. After successful file found, it is copied into "./error/" directory.
No comments:
Post a Comment