bash - awk: delete the first column and add four columns after the last one -


I have data that has the data displayed as:

  32446191 0 5 5 - 27 13210 62357877 18 89 89 2014-06-27 13210 33879626 81 1 1 2014-06-27 13210 In fact, I have approximately 30 columns to delete the first column (and separator) me And after the last one, four columns will be added. Then the result will be like:  
  0 5 5 2014-06-27 13210 0 0 18 89 89 2014-06-27 13210 0 0 81 81 1 1 2014-06-27 13210 0 0 0  

How to do it in awk with an order? Appreciate your assistance.

preserving the original space:

  $ Awk -v OFS = '' '{Sub (/ [^ [: space:]] + [[: space:]] + /, ""); Print $ 0, 0, 0, 0, 0 5 5 2014-06-27 13210 0 0 18 18 89 89 2014-06-27 13210 0 0 0 81 1 1 2014-06-27 13210 0 0 0  

Tweaks to suit OFS .


Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -