title: In Bash, is it possible to pass in a first argument and then remove the extension while keeping the file path?
body: <p>Suppose we have <code>/path/to/my/file.gz.gg</code> and I would like to get only <code>/path/to/my/file.gz</code></p>
  <p>I tried to use the alias:</p>
  <pre><code>alias myalias=&quot;echo ${1%.gz}&quot;
  </code></pre>
  <p>and run</p>
  <pre><code>myalias /path/to/my/file.gz.gg
  </code></pre>
  <p>but it doesn't work. Does anyone have any suggestions?</p>