From mboxrd@z Thu Jan 1 00:00:00 1970 MIME-Version: 1.0 In-Reply-To: <4AB1F53F.8090805@maht0x0r.net> References: <4AB1F53F.8090805@maht0x0r.net> Date: Thu, 17 Sep 2009 10:52:51 +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: Re: [9fans] awk help; not plan9 matter Topicbox-Message-UUID: 6fbaa9da-ead5-11e9-9d60-3106f5b1d025 2009/9/17 matt : > sed 's/^([^ ]+ +)([^ ]+)/\1HELL/' Well, actually, my problem is a part of a more complicated script; I don't know in advance neither the column nor what to put there. I currently have this awk ' /TH/ {$'$pos'='$new'} {print} ' inpch where 'TH' plays a role of a guard, and $pos and $new are the field to be changed and with what, respectively. I am afraid this rules out sed. Thanks Ruda