#!/bin/bash
echo 'first line' >foo.xml
echo 'second line' >>foo.xml
I am a complete newbie to shell scripting.
I am trying to run the above script in cygwin. I want to be able to write one line after another in a new file.
However, when I execute the above script, I see the following content in the foo.xml file:
second line
The second time I run the script, I see in the file foo.xml:
second line
second line
etc.
In addition, I see the following error displayed on the command line after running the script:
: No such file or directory.xml
Ultimately, I will run this script in a unix window, I'm just trying to develop it with cygwin. So I would appreciate it if you could indicate if this is a weird cygwin, and if so, should I try to use cygwin to develop such scripts?
Thanks in advance.