Pop-Up Thingie
Sidebar
Too Lazy BBS
Home
Forum
Files
Chat
Bulletins
Dark
Register
Log in
Username
Password
Who's Online
System Info
Sysop:
Amessyroom
Location:
Fayetteville, NC
Users:
28
Nodes:
6 (
0
/
6
)
Uptime:
47:30:57
Calls:
422
Files:
1,024
Messages:
90,391
Sidebar
Forum
Usenet
COMP.UNIX.SHELL
[ksh] Warning: pipe symbol within ${} should be quoted?
From
Janis Papanagnou
@21:1/5 to
All
on Thu May 8 01:00:40 2025
With syntax-check ('ksh -n') I get a warning in Ksh for this expression
"${pipe#* | }"
concerning the pipe symbol. (Bash and Zsh don't complain.)
(2709)$ ksh -n -c '"${pipe#* | }"'
ksh: warning: line 1: | within ${} should be quoted
(2710)$ ksh -n -c '"${pipe#* [|] }"'
ksh: warning: line 1: | within ${} should be quoted
(2711)$ ksh -n -c '"${pipe#* \| }"'
(2712)$ bash -n -c '"${pipe#* | }"'
(2713)$ bash -n -c '"${pipe#* [|] }"'
(2714)$ bash -n -c '"${pipe#* \| }"'
(2715)$ zsh -n -c '"${pipe#* | }"'
(2716)$ zsh -n -c '"${pipe#* [|] }"'
(2717)$ zsh -n -c '"${pipe#* \| }"'
Just a bug, or is ksh too sensible here, or some potential subtle issue?
Janis
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)