Help with echo

Hi Guys,

I need to print a value in the same line , But when we use the echo instead the loops (while), the value goes to the next line..

Can you help me in this..

Thanks For your help in advance.

Use printf instead

Try echo with the -n option or use printf.

If your echo doesn't have the "-n" option, use the "\c" flag in the echo string:

echo "String\c"

In ksh only

#!/bin/ksh
echo "In Single line\c"

The syntax echo "String\c" is not confined to ksh.
For your shell first check whether "echo" is a built-in:

type echo

If it is built-in, see the manual for your shell.
If it is not built-in, see "man echo" for your system.

try -n: