How would I write a bash function that can extract all common archive files? : <p>I'd like to have a bash function that can extract zip, tar, tar.gz and other archives.</p>

<p>How can this be done?</p>
