title: How do I get awk to NOT use space as a delimeter?
body: <p>I've got a CSV that I'm trying to process, but some of my fields contain commas, line breaks and spaces and now that I think about it, there's probably some apostrophes in there too. </p>
  
  <p>For the commas and line breaks, I've converted them to other strings at the output phase and convert them back at the end (yes it's messy but I only need to run this once) I realise that I may have to do this with the spaces too but I've broken the problem down to it's basic parts to see if I can work around it</p>
  
  <p>Here's an input.csv</p>
  
  <pre><code>"john","beatles.com","arse","fool@wonka.com","1","1","on holiday"
  "paul","beatles.com","bung","","0","1","also on holiday"
  </code></pre>
  
  <p>(I've tried with and without quotes)</p>
  
  <p>here's the script</p>
  
  <pre><code>INPUT="input.csv"
  
  for i in `cat ${INPUT}`
  
  do
  #USERNAME=`echo $i | awk -v  FS=',' '{print $1}'`
  USERNAME=`echo $i | awk 'BEGIN{FS="[|,:]"} ; {print $1}'`
  echo "username: $USERNAME"
  
  done
  </code></pre>
  
  <p>So that should just input john and paul but instead I get</p>
  
  <pre><code>username: "john"
  username: holiday"
  username: "paul"
  username: on
  username: holiday"
  </code></pre>
  
  <p>because it sees the spaces and interprets them as new rows. </p>
  
  <p>Can I get it to stop that?</p>