diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2015-02-16 15:55:10 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2015-02-16 15:55:10 +1300 |
commit | 6122a885e47ab8691e56635ad9f1264b935f87e0 (patch) | |
tree | 6d62be80563d3fe53dfc3cdbfa2f80e4a802df7e /bash | |
parent | Update plugin submodules (diff) | |
download | dotfiles-6122a885e47ab8691e56635ad9f1264b935f87e0.tar.gz dotfiles-6122a885e47ab8691e56635ad9f1264b935f87e0.zip |
New mkcp Bash function
Like mkmv, except it copies instead of moving files
Diffstat (limited to 'bash')
-rw-r--r-- | bash/mkcp.bash | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/bash/mkcp.bash b/bash/mkcp.bash new file mode 100644 index 00000000..7770556a --- /dev/null +++ b/bash/mkcp.bash @@ -0,0 +1,5 @@ +# Copy files into created directory in one call +mkcp() { + mkdir -p -- "${@: -1}" && cp -- "$@" +} + |