How to automatically turn any .sh into a dry-run to see what it'll do

1 month ago 7
<?php $script = file('link_plugins.sh'); foreach ($script as $line) { $trim = trim($line); if ($trim === '' || $trim[0] === '#') { echo $line; // comments or blank } else { echo "echo '+ $trim'\n"; } } ?> php dryrun.php > dryrun.sh bash dryrun.sh

Is there a better way?

Read Entire Article