AWK Shift empty column to left (to start position)

Posted by Filip Zembol on Stack Overflow See other posts from Stack Overflow or by Filip Zembol
Published on 2014-06-11T09:11:02Z Indexed on 2014/06/11 9:24 UTC
Read the original article Hit count: 223

Filed under:
|
|

INPUT:

fofo jojo tst

fojo jofo sts

rhr hrhh dodo

  jojo hoho jojo

  zozo roro vovo

OUTPUT:

fofo jojo tst

fojo jofo sts

rhr hrhh dodo

jojo hoho jojo

zozo roro popo

NOTE: Please help me, I need to shift all rows, which have first column empty. Every fields are tab delimited. In this file some rows start from first column, but some rows start from second or third column. Thank you

© Stack Overflow or respective owner

Related posts about awk

Related posts about sed