title: How to extract partial input filename to name output file
body: <p>I have a bash script (script.sh) that acts on a file called 12345.txt that currently produces an output file named "12345.txt_output":</p>
  
  <p>Command line:</p>
  
  <pre><code>bash script.sh 12345.txt
  </code></pre>
  
  <p>Last line of script.sh:</p>
  
  <pre><code>&gt; "${1}_output" 
  </code></pre>
  
  <p>How do I change the output command (while still using $1) to name the file 12345_output (instead of 12345.txt_output)?</p>