George Vieira <[EMAIL PROTECTED]> wrote:
> Is there a way to get this to work without getting $WORD2 on the next
> line...?

> #!/bin/bash
> WORD1="Hello"
> WORD2="World"

> echo -n "$WORD1                         " | cut -c -10
> echo "$WORD2"

> 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

Try using printf.
-- 
Debian GNU/Linux 2.2 is out! ( http://www.debian.org/ )
Email:  Herbert Xu ~{PmV>HI~} <[EMAIL PROTECTED]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

-- 
SLUG - Sydney Linux User Group Mailing List - http://slug.org.au/
More Info: http://slug.org.au/lists/listinfo/slug

Reply via email to