substr($line,$x,$len)

Kurt Wall kwall
Mon May 17 12:02:21 PDT 2004


In a 0.4K blaze of typing glory, M.W. Chang wrote:
> Could I use awk to obtain a part of string of $len character long on a 
> line starting from psoition x? cut couldn't do it (need a specific 
> delimiter).

Yes. index() returns the location of a specific string; you can then
use match() or substr().

Kurt
-- 
"Yeah, but you're taking the universe out of context."



More information about the Linux-users mailing list