Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <vveev6$dll3$1@dont-email.me>
Deutsch   English   Français   Italiano  
<vveev6$dll3$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: news.eternal-september.org!eternal-september.org!.POSTED!not-for-mail
From: Janis Papanagnou <janis_papanagnou+ng@hotmail.com>
Newsgroups: comp.unix.shell
Subject: Create functional processing pipe (without eval)?
Date: Wed, 7 May 2025 04:02:13 +0200
Organization: A noiseless patient Spider
Lines: 22
Message-ID: <vveev6$dll3$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 07 May 2025 04:02:18 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="1e1523bf95cc53221982e22c9f92842b";
	logging-data="448163"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1/cxkqi34SodLOnDeY5M34J"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
Cancel-Lock: sha1:4Z/9qFERqW6d7q1dn6HCGoFVPhw=
X-Mozilla-News-Host: news://news.eternal-september.org:119
X-Enigmail-Draft-Status: N1110

I'm pondering about creating a functional processing pipe, depending
on program parameters, and whether that's possible to achieve without
using 'eval'.

Say, the program is called "filter" and may accept 0..N parameters and
depending on the set of parameters the respective pipe functionality
shall be defined like

  filter               =>  cat
  filter p1            =>  cat | func p1
  filter p1 p2         =>  cat | func p1 | func p2
  filter p1 p2 ... pN  =>  cat | func p1 | func p2 | ... | func pN

where "func" is working as filter and accepts exactly one parameter.

(Because of reservations I have with 'eval' and quoting I'd like to
avoid that 'eval' indirection if possible.)

I think it's [in principle] not possible [without 'eval'] in shell
(POSIX, Ksh, Bash) but I'm interested to hear opinions...

Janis