On Sat, Oct 11, 2008 at 06:47:41AM -0500, Hugo Vanwoerkom wrote:
> Hi,
>
> How do you remove the last character of a string in awk?
Here's one way:
awk 'BEGIN { x = "Hello!"; print substr(x, 0, length(x) - 1)}'
Can't think of anything better quickly...
HTH.
Kumar
--
Kumar Appaiah
--
To UNSU
Hugo Vanwoerkom wrote:
> Hi,
>
> How do you remove the last character of a string in awk?
>
Did not test, but
substr(, 0, length() - 1)
should work, or should be close to what you want.
--
Horngren's Observation:
Among economists, the real world is often a special case.
Eduardo M K
Hi,
How do you remove the last character of a string in awk?
Hugo
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
3 matches
Mail list logo