From 45142cc2ce45ce952ea6ede763770becf8b74425 Mon Sep 17 00:00:00 2001 From: Sergio Date: Mon, 31 Jul 2023 19:43:41 +0200 Subject: [PATCH] =?UTF-8?q?A=C3=B1adido=20copy=5Ffiles=5Ffrom=5Flist.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- copy_files_from_list.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 copy_files_from_list.sh diff --git a/copy_files_from_list.sh b/copy_files_from_list.sh new file mode 100755 index 0000000..6074410 --- /dev/null +++ b/copy_files_from_list.sh @@ -0,0 +1,15 @@ +#!/bin/bash + +file="/home/sergio/jailers/list.txt" +src="/home/sergio/jailers/" +dst="/home/sergio/pas/" + +i=1 +while read -r line; do + +#Reading each line +echo "Line No. $i : $line" +mkdir -p "$dst$line" +cp -v "$src$line"/* "$dst$line" +i=$((i+1)) +done < $file \ No newline at end of file