bash - Add a new directory in shell script Linux -
How can I create a new directory using a function where I give the directory name as a parameter?
Example: then call: CreateNewDirectory \ home \ Folder1; # Creates a folder "Folder1" on the home name #
foo () {DirPath = $ {1: The path needed for the directory as the first argument} mkdir - "$ dirPath"}
foo / path / in / my / new / directory
Comments
Post a Comment