title: awk, bin/sh 0: 1: not found
body: <p>I am almost brand-new to coding and I would appreciate feedback. I am trying to make a shell script that will evaluate information in a text file and moved said text file if certain conditions are met. My code is below:</p>
  
  <pre><code>#!/bin/bash
  
  stock=HD
  
  awk ' /Rank/ {
      if ( $4 == "1-Strong" ) system("mv " "'$stock'.txt" " " ~/Desktop/Stocks/1/"'$stock'.txt") ;
      else if ( $4 == "2-Buy" ) system("mv " "'$stock'.txt" " " ~/Desktop/Stocks/2/"'$stock'.txt") ;
      else if ( $4 == "3-Hold" ) system("mv " "'$stock'.txt" " " ~/Desktop/Stocks/3/"'$stock'.txt") ;
      else if ( $4 == "4-Sell" ) system("mv " "'$stock'.txt" " " ~/Desktop/Stocks/4/"'$stock'.txt") ;
      else if ( $4 == "5-Strong" ) system("mv " "'$stock'.txt" " " ~/Desktop/Stocks/5/"'$stock'.txt")
  } ' $stock.txt
  </code></pre>
  
  <p>When I try to run the script, I get this error:</p>
  
  <pre><code>andrew@andrew-VirtualBox:~/Desktop/Stocks$ ./stockscript7.sh
  /bin/sh: 1: 0: not found
  </code></pre>
  
  <p>I made sure I was in bash shell. I did use chmod to give the script permissions. Otherwise from this error message I'm lost on what to try next. Any help would be much appreciated.</p>