Learning contd..

There has been rarely a day where I have not learned something new after joining this new job. And I have been extremely lazy in noting it down. However, better late than never. Here is a thing which I learned yesterday:

$ #!/bin/sh -e

Adding this line above the shell script will exit the script as soon as it encounters a failure in executing any command. Learned it hard way, after spending / debugging around 15-20 mins :-(

And a most wishful feature of “dd” command – with progress bar or some sort of feedback on how much data is copied: Use “dcfldd” instead of “dd” which by default shows how much data is copied.

Happy learning and sharing!

Advertisements

2 thoughts on “Learning contd..

    • Yea, why not! it is so convenient to run dd in background, and identify the PID and send the periodic USR1 signal, isn’t it? ;-)

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s