Skip to main content
Post Made Community Wiki by don_crissti
fixed per Costas comment
Source Link
don_crissti
  • 85.6k
  • 31
  • 234
  • 262

You could translate all spaces and double quotes to |, then squeeze (and |ss and finallyqueeze) then cut from the 2nd character to the end of line:

tr -s '[[:blank:]"]' \| <infile | tr -s \| | cut -c2-

You could translate all spaces and double quotes to |, then squeeze |s and finally cut from the 2nd character to the end of line:

tr '[[:blank:]"]' \| <infile | tr -s \| | cut -c2-

You could translate all spaces and double quotes to | (and squeeze) then cut from the 2nd character to the end of line:

tr -s '[[:blank:]"]' \| <infile | cut -c2-
Source Link
don_crissti
  • 85.6k
  • 31
  • 234
  • 262

You could translate all spaces and double quotes to |, then squeeze |s and finally cut from the 2nd character to the end of line:

tr '[[:blank:]"]' \| <infile | tr -s \| | cut -c2-