I have below script.
for f in echo1.txt echo2.txt
rm -rf "$f"
I am looking at dry running this script, it must print that it is going to remove echo1.txt and echo2.txt files. please advise.
cd /tmp/xyz for f in echo1.txt echo2.txt do echo rm -rf "$f" done
This I tried already, since I intent to know what all it should print, lets say any complex bash script, please assist me with one for better understanding which may help me to go for more complex scripts.