Linux checking shell command (bash) <p>How can I check if a shell command ends with some text? For instance if I type </p> <pre><code>$ http://example.com/file.webm </code></pre> <p>(ends with .webm) it will be automatically replaced with </p> <pre><code>$ wget http://example.com/file.webm </code></pre> <p>Of course only if command consists of one part.</p> <p>I'm using <code>bash</code> as my shell.</p>