HP3000-L Archives

February 1996, Week 3

HP3000-L@RAVEN.UTC.EDU

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Dan Hollis <[log in to unmask]>
Reply To:
Dan Hollis <[log in to unmask]>
Date:
Wed, 14 Feb 1996 16:15:00 PST
Content-Type:
text/plain
Parts/Attachments:
text/plain (69 lines)
>I performed the following under the POSIX shell on MPE/iX 5.0:
>
>shell/iX> cat <<'eof' >dummyfile
>> testing
>> 'eof'
>> eof
>shell/iX> cat dummyfile
>esting
>'eof'
>shell/iX>
>
>Is this really the proper operation? The perceived anomalies are:
>
>   1. Losing the first character of the first line.
>         (This happens consistently.)
>   2. Since I quoted the termination string in the 'cat' command,
>         the quotes should be required (and operational!) when
>         finished with input.
>   3. The '>' prompt should not exist.
>
>Mind you, my only experience (such as it is) is with Unix. I understand
>that POSIX is not Unix, and the depth of my understanding of this increases
>each
>day, but shouldn't this feature work the same as on Unix machines?
 
Using the POSIX shell under Linux:
 
Bill:/home/dhollis$ cat <<'eof' >dummyfile
> testing
> 'eof'
> eof
Bill:/home/dhollis$ cat dummyfile
testing
'eof'
Bill:/home/dhollis$
 
Using the POSIX shell under BSDI:
 
puma$ cat <<'eof' >dummyfile
> testing
> 'eof'
> eof
puma$ cat dummyfile
testing
'eof'
puma$
 
So we find the answers to your statements:
 
1. Should not happen. Probably a bug in the POSIX shell under MPE.
2. Should happen and is correct. The shell expands quoted strings and
   therefore the quotes are not present in the final command.
3. Should happen and is correct.
 
BIG HINT:
 
Bill:/home/dhollis$ cat <<"'eof'" > dummyfile
> testing
> 'eof'
Bill:/home/dhollis$ cat dummyfile
testing
Bill:/home/dhollis$
 
-Dan
.----------------------------------------------.
|Dan Hollis -- Pharmacy Computer Services, Inc.|
[log in to unmask]      -     (503)476-3139|
`----------------------------------------------'

ATOM RSS1 RSS2