bug-bash
[Top][All Lists]
Advanced

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

Re: [patch] new special variable: test argument


From: Piotr Grzybowski
Subject: Re: [patch] new special variable: test argument
Date: Mon, 21 Dec 2015 16:20:22 +0100

On Mon, Dec 21, 2015 at 2:21 PM, Greg Wooledge <wooledg@eeg.ccf.org> wrote:
> On Sat, Dec 19, 2015 at 12:58:41AM +0100, Piotr Grzybowski wrote:
>> #2
>> touch /tmp/`date +%s`; if [ -f /tmp/`date +%s` ]; then echo "ok: $^"; fi;
>
> This is both wrong (insecure) and clumsy.  You can't create a temp file
> this way. [..]

 It was a clumsy example then. No intention to create temporary file
there, so the rest is interesting but a bit off-topic. Personally I
always use randomized strings in conjunction with $$. using awk's rand
is a poor idea, and you should use as many other sources of randomness
as possible, preferably hexdump on /dev/urandom (keeping in mind the
difference /dev/random, blocking, etc) if you can. There are
implementations of awk that return very poor random numbers. (you see,
I read you wiki)
 Ok, it is off $^ topic, if you do not see the need for it that wraps
it up. Thanks for answer.

cheers,
pg



reply via email to

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