stopping or suppress echo from printing in new lines (c) - linux shell scripting

by RameshKumar 2010-01-27 13:07:41

c - c suppress trailing new line

Example:

for (( i = 0 ; i < 10 ; i++ ))
do
echo -e 'ramram'

done


OUTPUT:
ram
ram
ram
ram
ram
ram
ram
ram
ram
ram


Example with -c option:

for (( i = 0 ; i < 10 ; i++ ))
do
echo -e 'ram\c'

done


OUTPUT:
ramramramramramramramramramram

Tagged in:

1047
like
0
dislike
0
mail
flag

You must LOGIN to add comments