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: 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"}   

then call:

  foo / path / in / my / new / directory    

Comments

Popular posts from this blog

php - how to change mysql_result($res, 0, "url"); to mysqli -

Delphi: missing interface declarations for UI Automation methods -

android - How to attach an image from an app to gmail -