The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
From: Tony Finch <dot@dotat.at>
To: Richard Salz <rich.salz@gmail.com>
Cc: TUHS main list <tuhs@minnie.tuhs.org>,
	Grant Taylor <gtaylor@tnetconsulting.net>
Subject: Re: [TUHS] sockets (was Re: First appearance of named pipes)
Date: Thu, 26 Mar 2020 01:20:35 +0000	[thread overview]
Message-ID: <alpine.DEB.2.20.2003260106400.2480@grey.csi.cam.ac.uk> (raw)
In-Reply-To: <CAFH29trbW7cd6J6CbT5kchob==8catih=X2D=RUALYLEPeB+6A@mail.gmail.com>

So I fooled around making an HTTP request from bash...

	(printf 'HEAD / HTTP/1.0\r\nHost: dotat.at\r\n\r\n'; cat 1>&2) \
		0<>/dev/tcp/dotat.at/http 1>&0

And I wondered if it would work with ksh too. It does, but there is weirdness.

Bash's <> operator follows POSIX, so in my one-liner the 0 is redundant.

https://pubs.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_007_007

However when I look at a ksh man page I find it says

https://github.com/att/ast/blob/master/src/cmd/ksh93/sh.1#L3458

    <>word    Open file word for reading and writing as standard output.

I thought POSIX got features like this from ksh so I'm curious that a
weird little incompatibilty like this has crept in.

(The copy of ksh.1 I have from the CSRG archives lacks <> so I guess that
version was ksh88?)

Tony.
-- 
f.anthony.n.finch  <dot@dotat.at>  http://dotat.at/
Sole: Northerly 6 or 7 at first in west, otherwise easterly or northeasterly 5
or 6. Moderate or rough, occasionally very rough in west. Showers in west.
Good.

  parent reply	other threads:[~2020-03-26  1:37 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 22:44 [TUHS] First appearance of named pipes Noel Chiappa
2020-03-07 12:17 ` Paul Ruizendaal
2020-03-07 13:29   ` Clem Cole
2020-03-07 16:39   ` Derek Fawcus
2020-03-08  2:36     ` Rob Pike
2020-03-08  2:47       ` Larry McVoy
2020-03-08 13:07         ` Ralph Corderoy
2020-03-08 13:25           ` arnold
2020-03-08  3:06       ` Dave Horsfall
2020-03-08  7:16       ` arnold
2020-03-08 15:13       ` [TUHS] sockets (was Re: First appearance of named pipes) Derek Fawcus
2020-03-09 23:22         ` Grant Taylor via TUHS
2020-03-09 23:44           ` Larry McVoy
2020-03-23  8:49           ` Peter Pentchev
2020-03-24  9:47             ` Derek Fawcus
2020-03-25 23:25               ` Grant Taylor via TUHS
2020-03-25 23:47                 ` Richard Salz
2020-03-26  0:11                   ` Grant Taylor via TUHS
2020-03-26  0:18                     ` Richard Salz
2020-03-26  1:08                       ` Grant Taylor via TUHS
2020-03-26  2:38                         ` Dave Horsfall
2020-03-26  3:08                           ` Rob Pike
2020-03-26  3:43                             ` George Michaelson
2020-03-26  4:11                           ` Grant Taylor via TUHS
2020-03-28 11:12                           ` Peter Pentchev
2020-03-28 11:14                             ` Peter Pentchev
2020-03-28 16:03                               ` Steffen Nurpmeso
2020-03-26  1:20                       ` Tony Finch [this message]
2020-03-27 10:51                   ` Derek Fawcus
2020-03-09 23:22 ` [TUHS] First appearance of named pipes Grant Taylor via TUHS
2020-03-10  7:29   ` arnold
2020-03-11  2:47     ` Grant Taylor via TUHS
2020-03-11  7:02       ` arnold
2020-03-10 13:49   ` Chet Ramey
2020-03-10 20:26     ` Dave Horsfall
2020-03-10 20:37       ` Chet Ramey
2020-03-11  2:51       ` Grant Taylor via TUHS
2020-03-08 23:09 [TUHS] sockets (was Re: First appearance of named pipes) Norman Wilson
2020-03-09 17:09 ` Tony Finch

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=alpine.DEB.2.20.2003260106400.2480@grey.csi.cam.ac.uk \
    --to=dot@dotat.at \
    --cc=gtaylor@tnetconsulting.net \
    --cc=rich.salz@gmail.com \
    --cc=tuhs@minnie.tuhs.org \
    /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 NNTP newsgroup(s).