title: Linux awk script - convert pipe delimited to fixed width
body: <p>I am trying to convert a pipe delimited input file to a fixed width file.  Below is the input file and the expected output.  I have also included the script I am attempting.  I have tried several variations without success.  I am very new to Linux and have been trying to piece together bits and pieces of code to help me understand better, but i am failing and hoping someone will be able to assist me. </p>
  
  <p>awk -v FS="|" FIELDWIDTHS="9 1 2 1 2 2 5 5 7 10 9 11" -v OFS="" '{print $1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11}' input.txt > output.txt</p>
  
  <pre><code>$ cat input.txt
  # Input File
  #
  aa|bbb|cccc|ddddd|
  #
  
  
   $ cat output.txt
   # Output File
   #
   aabbbccccdddddd
   #
  </code></pre>