Works for me in ksh93 on AIX 7.2, but not ksh (ksh89).
cat < /dev/tcp/localhost/21
220 localhost FTP server (Version 4.2 Mon Jan 27 07:54:52 CST 2020) ready.
Otherwise remember KSH(89) and KSH93 aren't bash.
On Thu, Feb 02, 2023 at 07:37:50PM +0000, Plamen Tanovski via IBM Community wrote:
> Hi,
>
> the /dev/tcp/... pseudo devices are missing in ksh and ksh93 on AIX7.3
>
> $ < /dev/tcp/localhost/22
> ksh93: /dev/tcp/localhost/22: cannot open [A file or directory in the path name does not exist.]
> $ oslevel -s
> 7300-00-02-2220
> $ print ${.sh.version}
> Version M 93u+ 2012-08-01
>
> In bash it works as expected
>
> $ bash -c -- '< /dev/tcp/localhost/22'
> $ echo $?
> 0
>
> This is, to be polite, unacceptable! Why is ksh treated so poorly?!
>
> Best regards,
> P. Tanovski
>
> ------------------------------
> Plamen Tanovski
> ------------------------------
>
>
> Reply to Sender :
https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=354446&SenderKey=52e236d8-428c-4433-b802-231ce1569745>
> Reply to Discussion :
https://community.ibm.com/community/user/eGroups/PostReply?GroupId=6049&MID=354446>
>
>
> You are subscribed to "AIX" as
Russell.Adams@AdamsSystems.nl. To change your subscriptions, go to
http://community.ibm.com/community/user/preferences?section=Subscriptions. To unsubscribe from this community discussion, go to
http://community.ibm.com/HigherLogic/eGroups/Unsubscribe.aspx?UserKey=c23dfccc-9910-40ae-beeb-fdcbced5bf1f&sKey=KeyRemoved&GroupKey=7b554d78-d4dc-417a-b4dc-017e309e5c91.------------------------------------------------------------------
Russell Adams
Russell.Adams@AdamsSystems.nlPrincipal Consultant Adams Systems Consultancy
https://adamssystems.nl/
Original Message:
Sent: 2/2/2023 2:38:00 PM
From: Plamen Tanovski
Subject: /dev/tcp broken in KSH{,93} on AIX7.3
Hi,
the /dev/tcp/... pseudo devices are missing in ksh and ksh93 on AIX7.3
$ < /dev/tcp/localhost/22
ksh93: /dev/tcp/localhost/22: cannot open [A file or directory in the path name does not exist.]
$ oslevel -s
7300-00-02-2220
$ print ${.sh.version}
Version M 93u+ 2012-08-01
In bash it works as expected
$ bash -c -- '< /dev/tcp/localhost/22'
$ echo $?
0
This is, to be polite, unacceptable! Why is ksh treated so poorly?!
Best regards,
P. Tanovski
------------------------------
Plamen Tanovski
------------------------------