From b27a88ca431bba4fe5036ab54348367b45bc9cd3 Mon Sep 17 00:00:00 2001 From: Mariano Spadaccini Date: Tue, 7 Feb 2023 17:02:50 +0100 Subject: PWC 203 - Perl, Python, Go, Bash, Korn shell --- challenge-203/spadacciniweb/bash/ch-2.bash | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 challenge-203/spadacciniweb/bash/ch-2.bash (limited to 'challenge-203/spadacciniweb/bash/ch-2.bash') diff --git a/challenge-203/spadacciniweb/bash/ch-2.bash b/challenge-203/spadacciniweb/bash/ch-2.bash new file mode 100644 index 0000000000..022c932d20 --- /dev/null +++ b/challenge-203/spadacciniweb/bash/ch-2.bash @@ -0,0 +1,12 @@ +#!/bin/bash + +echo -n "path source: " +read SOURCE + +[ -d "$SOURCE" ] || { echo "$SOURCE directory does not exist."; exit 1; } + +echo -n "path target: " +read TARGET +[ -d "$TARGET" ] || { echo "$TARGET directory does not exist."; exit 1; } + +rsync -av -f"+ */" -f"- *" $SOURCE/ $TARGET -- cgit