From: Tim Taylor <ttaylor@mitre.org>
To: cygwin@sourceware.cygnus.com
Subject: Why doesn't this work?
Date: Thu, 05 Aug 1999 07:19:00 -0000 [thread overview]
Message-ID: <37A99DAA.975036DA@mitre.org> (raw)
Can anyone tell me why this script always outputs "fail"?
=========== beginning of script ============
#! /bin/sh
if echo line2 from branch1 | cmp - file1 >/dev/null; then
echo pass
else
echo fail
fi
============= end of script ==============
The file1 in the above script contains the following (without the
quotes):
"line2 from branch1\r\n"
where \r\n is actually 0x0D0A
The output from my uname command is shown below
bash-2.02$ uname -a
CYGWIN_NT-4.0 TAYLOR-NT 21.0 (0.8/1/2) 1999-1-18 00:09:41 i686 unknown
When I try running cmp from the command line using:
bash-2.02$ cmp - file1<ENTER>
line2 from branch1<CTL-D>
I get the following error message:
cmp: EOF on -
appearing on the same line as the text I typed. Then I get the bash
prompt. As soon as I type a key, bash outputs the text I typed (line2
from branch1) followed by the new key.
Any help would be greatly appreciated.
- Tim Taylor
--
======================================================================
Timothy L. Taylor Internet: ttaylor@mitre.org
Lead Software Systems Engineer Voice: (781) 271-8770
The Mitre Corporation Fax: (781) 271-7231
202 Burlington Rd. Mail Stop: B295
Bedford, Massachusetts 01730-1420
======================================================================
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
WARNING: multiple messages have this Message-ID
From: Tim Taylor <ttaylor@mitre.org>
To: cygwin@sourceware.cygnus.com
Subject: Why doesn't this work?
Date: Tue, 31 Aug 1999 23:49:00 -0000 [thread overview]
Message-ID: <37A99DAA.975036DA@mitre.org> (raw)
Message-ID: <19990831234900.2ZuxVaVLBm5rrSWMm0ElwUJEhRYrwGCEPSxYdYvpVn8@z> (raw)
Can anyone tell me why this script always outputs "fail"?
=========== beginning of script ============
#! /bin/sh
if echo line2 from branch1 | cmp - file1 >/dev/null; then
echo pass
else
echo fail
fi
============= end of script ==============
The file1 in the above script contains the following (without the
quotes):
"line2 from branch1\r\n"
where \r\n is actually 0x0D0A
The output from my uname command is shown below
bash-2.02$ uname -a
CYGWIN_NT-4.0 TAYLOR-NT 21.0 (0.8/1/2) 1999-1-18 00:09:41 i686 unknown
When I try running cmp from the command line using:
bash-2.02$ cmp - file1<ENTER>
line2 from branch1<CTL-D>
I get the following error message:
cmp: EOF on -
appearing on the same line as the text I typed. Then I get the bash
prompt. As soon as I type a key, bash outputs the text I typed (line2
from branch1) followed by the new key.
Any help would be greatly appreciated.
- Tim Taylor
--
======================================================================
Timothy L. Taylor Internet: ttaylor@mitre.org
Lead Software Systems Engineer Voice: (781) 271-8770
The Mitre Corporation Fax: (781) 271-7231
202 Burlington Rd. Mail Stop: B295
Bedford, Massachusetts 01730-1420
======================================================================
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com
next reply other threads:[~1999-08-05 7:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-08-05 7:19 Tim Taylor [this message]
1999-08-31 23:49 ` Tim Taylor
1999-08-09 11:25 Dirk Fieldhouse
1999-08-31 23:49 ` Dirk Fieldhouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=37A99DAA.975036DA@mitre.org \
--to=ttaylor@mitre.org \
--cc=cygwin@sourceware.cygnus.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).