Dear experts,
I have a local computer and remote computer (only sftp accessed).
I want to delete files x and y in both local and remote computer using the following automated script:
sftp $remote > /dev/null < mdel.file
the file mdel.file has been pre-created, and its content is
cd /usr/directory
rm x
rm y
The script works fine when both files x and y exhist in $remote computer.
The script is interrupted when file x does not exhist in $remote computer.
And therefore, the file y is not removed.
My question is, can I be able to remove file y in case the file x is not exhist?
The reason is that I can not gurantted that the file x exhist.
Many thanks