about summary refs log tree commit diff
path: root/sourcecodes/examplefilecopy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sourcecodes/examplefilecopy.sh')
-rw-r--r--sourcecodes/examplefilecopy.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/sourcecodes/examplefilecopy.sh b/sourcecodes/examplefilecopy.sh
new file mode 100644
index 00000000..cd49d670
--- /dev/null
+++ b/sourcecodes/examplefilecopy.sh
@@ -0,0 +1,11 @@
+#!/bin/bash
+cd ./data/$1/
+FILES=$2*
+for f in $FILES
+do
+  echo "Processing $f file..."
+  new=${f//$2/$3} 
+  # take action on each file. $f store current file name
+  #echo "new Processing $new file..."
+  cp $f ../$new
+done
\ No newline at end of file