I am creating a script which will connect to remote server with ssh and perfom below.
- Search in a directory
- Search for a pattern
- Check the size if greater than the size_limit rename the file.
You have been asked before to use CODE tags. It's not hard to do and it makes code/data far easier to read. Highlight the text and press the CODE icon, or manually wrap the text in &
Anyway, I'm assuming that this is a listing from the remote server you are connecting to with ssh. Could you try:-
find /tmp -name "abc*log" -type f -size +100c|while read file
do
printf "mv $file ${file}_BKUP\n"
mv $file ${file}_BKUP
done
Does that help at all? The printf just produces some trace output. You can remove it if you are happy it works.