Shell script to generate random files using RANDOM variable

in Categories Tempfile last updated April 10, 2008

Share this on:

3 comment

  1. This is bad practice. A much better way would be to use $$, which is the process ID. In the loop above I would create a filename of “/tmp/$(basename $0).$$.txt”

    Have a question? Post it on our forum!