I want to add text to a file using shell-scripts. The solution I know is if you want to insert your text into a newline (appending):
echo "mytext" >> myfile.txt
what I want to have a continuous text at the end of process.
for ((I=0; I <72 ; I++))
do
echo "mytext$I, " >> myfile.txt ?????
done
I want something like:
mytext0, mytext1, mytext2, mytext3, ...., mytext71
but instead I get:
mytext0,
mytext1,
....
mytext71
echo
outputs a newline each pass of the loop. do wantecho -n
? – Skaperen Aug 27 '15 at 08:56