title: Is there a way use a different command besides echo (do rm file) inside a conditional in unix
body: <p>okay, I am reading the filenames from filelist.txt; for each line in filelist.txt I want to run a command <code>lar -c</code>.</p>
  
  <p>To test my code I only want to run on the first line. </p>
  
  <p>Here is my code </p>
  
  <pre><code>#!/bin/bash
  
  fileList=/path/to/fileList.txt
  count=1
  if [[ $count == 1]]; then
    #getting the first line of the txt file
    line=$(sed "${count}q;d" $fileList)
    #execute my command
    do lar -c $line
  fi;
  count=`expr $count +1`
  </code></pre>
  
  <p>but when i try to execute my .sh file i get the following error</p>
  
  <pre><code>./ReadFilesFirstBatch.sh: line 34: syntax error near unexpected token `do'
  </code></pre>
  
  <p>I apologize I'm very new to bash coding but I want to figure this out!</p>