Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: remus on September 16, 2014, 02:23:41 AM

Title: shell script and \n
Post by: remus on September 16, 2014, 02:23:41 AM
Hi all,
Doing a little basic shell scripting, and noticed that my script writes the \n character on screen, instead of creating a new line.

Heres an example
Quote
echo "\n" $sep "SUCCESS Remote backup COMPLETED on $DateTime. E-mail sent with details.\n"

Will write the following to screen.

\n -------------------------------------------------------------------\n SUCCESS Remote backup COMPLETED on 06:23:13 AM 16-23-2014. E-mail sent with details.\n
Title: Re: shell script and \n
Post by: bmarkus on September 16, 2014, 02:31:33 AM
echo -e "\n"
Title: Re: shell script and \n
Post by: remus on September 16, 2014, 03:02:15 AM
thanks bmarkus, that works, its not required in ubuntu, is this the tinycore way ?
Title: Re: shell script and \n
Post by: bmarkus on September 16, 2014, 03:21:29 AM
Not TC, BusyBox shell. On system level forget *BUNTU as a reference.

It is a good practice to study TC scripts before writing scripts for TC.