I want to insert a new line character inside the file between these two record entries "san" and "man". How can this be done
echo " san " >"C:/\Test/\Output/\Neme"
echo " man " >>"C:/\Test/\Output/\Name"
Name file should look like this
san
man
Please help
The echo command should by default be putting a newline char at the end of each line. But if it isn't, you can specify the newline char, like this:
echo " san \n"
echo " san \n"
gives the following output
san \n
but when we use echo -e " san \n" it gives the desired output on the screen but while inserting into the file it doesn't work.
Please help me how to make it work
Regards
Sandeep
strange,
it should only be
san
<newline>
<prompt>
Actually i am using cygwin and the problem was in the editor(notepad) which was not displaying it correctly. When i opened the same file in wordpad the display was as desired.
Thanks
Sandeep