stopping or suppress echo from printing in new lines (c) - linux shell scripting
by RameshKumar[ Edit ] 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