Open daviddwlee84 opened 3 years ago
https://unix.stackexchange.com/questions/305844/how-to-create-a-file-and-parent-directories-in-one-command https://stackoverflow.com/questions/6212219/passing-parameters-to-a-bash-function
touch_create () { # Create file with its parent folders # https://unix.stackexchange.com/questions/305844/how-to-create-a-file-and-parent-directories-in-one-command # https://stackoverflow.com/questions/6212219/passing-parameters-to-a-bash-function file=$1 mkdir -p "${file%/*}" && touch "$file" }
https://unix.stackexchange.com/questions/305844/how-to-create-a-file-and-parent-directories-in-one-command https://stackoverflow.com/questions/6212219/passing-parameters-to-a-bash-function