George Vieira <[EMAIL PROTECTED]> wrote:
> Is there a way to get this to work without getting $WORD2 on the next
> line...?
[...]
>
> Problem here is that "cut" adds a CR at the end and there's no switch to
> tell it not to.. so I end up with
Sounds like a bug in cut to me.
I've just tried this under Solaris, and it works as expected (ie, no new
line added). One for the GNU bugs people perhaps?
As for how to do it, you could try the following :
echo -n `echo "$WORD1 " | cut -c 1-10`
Works under Solaris, but I don't have a Linux box booted to test it on.
Scott.
--
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug