Re: cygwin script file name error

Amos Shapira <[email protected]>
Newsgroups gmane.org.user-groups.slug.general
Message-ID <CAF9n_WWar-7psv5BrWbMrabV0sP8FSDsCWdrTxaeBCvDttJ8VQ@mail.gmail.com>
BTW, in addition to the rest that was said, "cat -tve" is very useful in
troubleshooting such issues.
On 21 Feb 2014 15:24, <[email protected]> wrote:

> I've made a crude script under cygwin/XP, it was mainly working, but,
> after some edits, I'm getting a '?' appended to file name ?
> as so:
> sms_out_now.txt?
>
> when I paste individual lines at command line, it seems to work, when I
> run from the 3 line script, it seems to append the '?'
> where am I going wrong, I'm trying to copy small file, then, put current
> time/date:
>
> the problem (I think?) arose after I added 'date >>' part
>
>  ~
> $ cat /home/voytek/sendsms
> #! /bin/sh
> cp /var/spool/sms/sms_out /var/spool/sms/sms_out_now.txt
> date  >>  /var/spool/sms/sms_out_now.txt
> mv /var/spool/sms/sms_out_now.txt /var/spool/sms/outgoing/
>
> $ ls -al /var/spool/sms/
> ...
> drwxr-xr-x+ 1 voytek None  0 Feb 21 15:08 .
> drwxr-xr-x+ 1 voytek None  0 Jan 29  2010 ..
> ...
> -rwxr-xr-x  1 voytek None 62 Feb 18 21:47 sms_out
> -rwxr-xr-x  1 voytek None 92 Feb 21 10:37 sms_out_now.txt?
>
>
> voytek
>
>
> --
> SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
> Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
>
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.