title: How to pass parameters using command line arguments in shell script
body: <p>I am new to shell script and I am working on shell scripting for jmeter. So far to run a jmeter script, I have written my shell script like below:</p>
  
  <pre><code>#! bin/sh    
  start(){
      echo "Please enter the file name .jmx extension"
      read file
  
  echo "Please enter the log file name .jtl extension"
  read log_file
  
  jmeter.sh -n -t $file -l $log_file
  }
  while [ "$1" != "" ]; do
  case "$1" in
          start )
              start
              ;;
           *)
              echo $"Usage: $0 {start|stop}"
              exit 1
          esac
     shift
  done
  </code></pre>
  
  <p>I have a stop method to terminate the process. Here, for this script I am asking the user to enter the <code>.jmx</code> fileName and <code>.jtl</code> fileName in different lines. But I want the user to be able to pass the <code>.jmx</code> fileName and <code>.jtl</code> fileName at the time he types the command to execute the script. </p>
  
  <p>example: <code>$ ./script.sh .jmx fileName .jtl fileName</code> then, the script should run.</p>
  
  <p>I don't know how to do it. Can someone please help?</p>