diff options
Diffstat (limited to 'bash/bashrc.d/mkcp.bash')
-rw-r--r-- | bash/bashrc.d/mkcp.bash | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/bashrc.d/mkcp.bash b/bash/bashrc.d/mkcp.bash new file mode 100644 index 00000000..7770556a --- /dev/null +++ b/bash/bashrc.d/mkcp.bash @@ -0,0 +1,5 @@ +# Copy files into created directory in one call +mkcp() { + mkdir -p -- "${@: -1}" && cp -- "$@" +} + |