This will be an unreadable character in your script.
Cygwin has two modes Unix line ends and Windows line ends. The ? is
actually a \r
In 'vi' ':set ff=unix' ':wq' to switch line endings.
if there is a \r showing go to it and press 'x' to delete it.
-----Original Message-----
From: li...@sbt.net.au
Sent: Friday, February 21, 2014 3:24 PM
To: slug@slug.org.au
Subject: [SLUG] cygwin script file name error
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
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4335 / Virus Database: 3705/7102 - Release Date: 02/17/14
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2014.0.4335 / Virus Database: 3705/7102 - Release Date: 02/17/14
--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html