title: shell script that will combine two files into another file?
body: <p>Contents of input file 1:</p>
  
  <pre><code>David 734.838.9801
  Roberto 313.123.4567
  Sally 248.344.5576
  Mary 313.449.1390
  Ted 248.496.2207
  Alice 616.556.4458
  Frank 634.296.1259
  </code></pre>
  
  <p>Contents of input file 2:</p>
  
  <pre><code>Roberto Tuesday 2
  Sally Monday 8
  Ted Sunday 16
  Alice Wednesday 23
  David Thursday 10
  Mary Saturday 14
  Frank Friday 15
  </code></pre>
  
  <p>How can i make a bash script combining the two files making it look like below  using output redirection within the script and using loop structure? so i opened a new vi file called output.sh and i inserted join inputfile1 inputfile2 > output.sh. when i try to run it with bash output.sh, it tells me file 1 is not in sorted order and same with two then ted command not found alice command not found which are the names. </p>
  
  <pre><code>Name        On-Call         Phone           Start Time
  Sally       Monday          248.344.5576        8am
  Roberto     Tuesday         313.123.4567        2am
  Alice       Wednesday       616.556.4458        11pm
  David       Thursday        734.838.9801        10am
  Frank       Friday          634.296.1259        3pm
  Mary        Saturday        313.449.1390        2pm
  Ted     Sunday          248.496.2207        4pm
  </code></pre>