Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"Of all the tyrannies that affect mankind, tyranny in religion is the worst." -- Thomas Paine


devel / comp.unix.shell / Re: Command 'strings' reading (not) standard input

SubjectAuthor
o Command 'strings' reading (not) standard inputJanis Papanagnou

1
Re: Command 'strings' reading (not) standard input

<tcvs8g$1pihd$1@dont-email.me>

  copy mid

http://rslight.i2p/devel/article-flat.php?id=6606&group=comp.unix.shell#6606

  copy link   Newsgroups: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!reader01.eternal-september.org!.POSTED!not-for-mail
From: janis_papanagnou@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell
Subject: Re: Command 'strings' reading (not) standard input
Date: Wed, 10 Aug 2022 11:03:11 +0200
Organization: A noiseless patient Spider
Lines: 31
Message-ID: <tcvs8g$1pihd$1@dont-email.me>
References: <tcu8re$1f6op$1@dont-email.me> <tcu99g$1d1mf$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 10 Aug 2022 09:03:12 -0000 (UTC)
Injection-Info: reader01.eternal-september.org; posting-host="36dd0e9b16a7cf2815e9b7db1df5f489";
logging-data="1886765"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/sU066BenCfAoahL0jf6UX"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:di3N1GPpQTevoQHF8lxFsNBvZYg=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <tcu99g$1d1mf$1@dont-email.me>
 by: Janis Papanagnou - Wed, 10 Aug 2022 09:03 UTC

On 09.08.2022 20:33, Lew Pitcher wrote:
> On Tue, 09 Aug 2022 20:25:50 +0200, Janis Papanagnou wrote:
>
>> Thanks to process substitution in newer shells I can write, e.g.,
>> strings <( zcat file.gz ) | ...
>>
>> I am wondering, though, whether there's a reason why 'strings' is
>> not defined to support (additionally) filter calling semantics
>> ...(binary stream)... | strings | ...(text stream)...
>
> Closed, cannot reproduce
>
> 14:32 $ strings <(zcat ./cat.gz) | grep comment
> .comment

Yes, that is what works, as I wrote; using the newer process
substitution shell feature that some Unix systems support.

In older or non-supporting shells and Unix versions you'd
have tried it the "standard way"...

zcat ./cat.gz | strings | grep comment

piping the results of zcat into strings.

According to the man page you have to provide a file, and a
test of '-' as a filename substitute won't work since that's
a third alternative to options -a or --all.

Janis

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor