Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Random file creation in zsh shell.
- X-seq: zsh-workers 51870
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: LitHack <lithack0@xxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: Random file creation in zsh shell.
- Date: Sat, 17 Jun 2023 08:36:09 +0200
- Archived-at: <https://zsh.org/workers/51870>
- In-reply-to: <CADc_fS0itRp3LKH9V9rZHroCZrocu=1CgjJW1HxrNTUkgZjJHg@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CADc_fS0itRp3LKH9V9rZHroCZrocu=1CgjJW1HxrNTUkgZjJHg@mail.gmail.com>
On Sat, Jun 17, 2023 at 4:04 AM LitHack <lithack0@xxxxxxxxx> wrote:
>
> There is a way to create a random file in zsh shell by which we could hide any of our data in it.
>
> Command: <>=()
I found this surprising.
% =true < =()
% ls /tmp/zsh*
/tmp/zshMw5YZq
Is it expected for `=true < =()` to leave a temporary file behind?
With the builtin `true` the behavior matches my expectation:
% true < =()
% ls /tmp/zsh*
zsh: no matches found: /tmp/zsh*
Another example that leaves a temporary file behind:
% ( exec true ) < =()
All of these work as expected, meaning that they don't leave a
temporary file behind:
% () { =true } < =()
% ( =true ) < =()
% ( true ) < =()
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author