From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 Date: Thu, 17 Sep 2009 10:23:09 +0200 Message-ID: From: Rudolf Sykora To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net> Content-Type: text/plain; charset=ISO-8859-1 Subject: [9fans] awk help; not plan9 matter Topicbox-Message-UUID: 6f7ebf38-ead5-11e9-9d60-3106f5b1d025 Hello, simple task. I want to change the 2nd field on each line of a file, but preserve the spacing of the lines. If I do awk '{$2="hell"; print}' file the field gets changed, but all the spacing of the lines is gone; i.e. any space is now just ' ' like this: 1 3 4 8 changes to 1 hell 4 8 while I need 1 hell 4 8. Any help? Thanks Ruda