bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: "here strings" and tmpfiles


From: Chet Ramey
Subject: Re: "here strings" and tmpfiles
Date: Fri, 22 Mar 2019 10:04:00 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:60.0) Gecko/20100101 Thunderbird/60.5.3

On 3/18/19 8:40 PM, Eduardo A. Bustamante López wrote:

> Having said that, have you tried process substitution as an option?
> 
> You should be able to do something like:
> 
> 
>   mycommand < <(printf %s 'super secret')
> 
> 
> That will:
> 
> - not write the 'super secret' string to the file-system, nor
> - show the mentioned string in the process tree (because printf is a bash
>   built-in command, and thus, does not require a fork).
> 

That works if the process substitution implementation uses /dev/fd. If it
uses a named pipe, it will touch the file system.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]