Shell Script To Create Files and Directories That Do Not Exist

Posted on in Categories Academic, Decision Making, File-management last updated February 19, 2009

5 comment

  1. This script isn’t multi-process safe.
    Test it by calling the same process with same file names multiple times in a wrapper script. ‘touch’ only changes last modification time, couldn’t tell you if a file is already been created.

  2. michael: u can run this script by below.

    shell> chmod +x script_name
    shell> ./script_name

    above is one way of running the script where script_name is the name you give to the shellscript you saved.

    you can also run it as below;
    shell> sh script_name

Leave a Comment