5 ms·
I have used echo as a sort of poor mans equivalent for a safe check of a pipeline, removing the echo when I felt the rest of the pipeline was working correctly.
by somat 3mo ago
I have used echo as a sort of poor mans equivalent for a safe check of a pipeline, removing the echo when I felt the rest of the pipeline was working correctly.
shell stuff | xargs -n 1 -I % echo real command and % args
I have also been known to write scripts where instead of executing the critical parts it prints them. Then a dry run is
script
and the real run is
script | sh
- bryancoxwell 3mo agoLove that idea, thanks for sharing
- krackers 3mo agoShouldn't you use echo instead of cat?
- somat 3mo agoyes echo, total brain fart there. corrected.