title: Replacing specific characters in first column of text
body: <p>I have a text file and I'm trying to replace a specific character (.) in the first column to another character (-). Every field is delimited by comma. Some of the lines have the last 3 columns empty, so they have 3 commas at the end.</p>
  
  <p>Example of text file:</p>
  
  <pre><code>abc.def.ghi,123.4561.789,ABC,DEF,GHI
  abc.def.ghq,124.4562.789,ABC,DEF,GHI
  abc.def.ghw,125.4563.789,ABC,DEF,GHI
  abc.def.ghe,126.4564.789,,,
  abc.def.ghr,127.4565.789,,,
  </code></pre>
  
  <p>What I tried was using awk to replace '.' in the first column with '-', then print out the contents.</p>
  
  <p>ETA: Tried out sarnold's suggestion and got the output I want.</p>
  
  <p>ETA2: I could have a longer first column. Is there a way to change ONLY the first 3 '.' in the first column to '-', so I get the output</p>
  
  <pre><code>abc-def-ghi-qqq.www,123.4561.789,ABC,DEF,GHI
  abc-def-ghq-qqq.www,124.4562.789,ABC,DEF,GHI
  abc-def-ghw-qqq.www,125.4563.789,ABC,DEF,GHI
  abc-def-ghe-qqq.www,126.4564.789,,,
  abc-def-ghr-qqq.www,127.4565.789,,,
  </code></pre>