From 6122a885e47ab8691e56635ad9f1264b935f87e0 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Mon, 16 Feb 2015 15:55:10 +1300 Subject: New mkcp Bash function Like mkmv, except it copies instead of moving files --- bash/mkcp.bash | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 bash/mkcp.bash (limited to 'bash') 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 -- "$@" +} + -- cgit v1.2.3