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

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -