lsof command is used fot the open files in linux.Which command is used for checking if file is not open.I want to use in my script
my condition is
do
if [[ 'lsof | grep $r_error_file' ]]
then
error_text=$error_text$(tail -n +1 $r_error_file | grep 'Error\')
mv $r_error_file $(dirname ${r_error_file})/BkError/$(filename ${r_error_file})
fi
done