Occasionally when scripting it is desirable to not perform an action when modifying or creating a new script. In this case it is nice to be able to do a dry run similar to –dry-run for make.
When I’m making a script I’ve learned the hard way to:
- Make backups before hand
- Make backups while performing operations
- Perform mock dry runs by using echo liberally.
So next time you’re trying to do something complex and don’t want to do something goofy, stick an echo in there before running it and save yourself some time.
Image Source: http://www.flickr.com/photos/redteam/