title: Reading a specific column in a CSV file with bash
body: <p>I'm really inexperienced with bash/shell scripts. I have a large volume of files that I need to SCP across servers. I have a list of the files I need to move in a CSV file with three columns. The second column is called file_name, and contains the path of the file.</p>
  
  <p>I need to read every single line of the file, but only process the second column. I found something like this on the internet:</p>
  
  <pre><code>#!/bin/bash
  
  csv_file=$1
  
  while IFS=',' read -r file_name; do
      echo -e "File Name\t: $file_name"
  done &lt; $csv_file
  IFS=$' \t\n'
  </code></pre>
  
  <p>But it just seems to output all 3 columns of the file. Any guidance would be greatly appreciated, I really don't know much about bash.</p>
  
  <p>Thanks!</p>