Commit 3ca7bf38 authored by Kaspar Scharf's avatar Kaspar Scharf

PostProcessing: Added script to copy post processed files and notes files to...

PostProcessing: Added script to copy post processed files and notes files to extra dir and updated readme.
parent f68c5f46
#!/bin/bash
function processFile() {
notesFileName="$(echo $1 | grep notes)"
if [ "$1" == "$notesFileName" ];
then
echo "Copying note file $1."
cp "$1" "$notesDirPath/$1"
return
fi
outFileName="$(echo $1 | grep out)"
if [ "$1" == "$outFileName" ];
then
echo "Copying output file $1."
cp "$1" "$outputDirPath/$1"
return
fi
echo "Skipping original record file $1."
}
function processDir() {
if [ -z "$(ls -A $1)" ]; then
echo "Skipping empty directory $1."
else
cd $1
echo "Entering directory $1."
for i in *
do
processFile $i
done
echo "Exiting directory $1."
cd ..
fi
}
outputDirPath="$(pwd)/outputFiles"
notesDirPath="$(pwd)/notesFiles"
mkdir $outputDirPath
mkdir $notesDirPath
if [ -z "$1" ] || [ ! -d $1 ]
then
echo No directory given or directory does not exist.
else
cd $1
for i in *
do
if [ -d "$i" ]; then
processDir $i
fi
done
fi
To automatically process all files in a directory, run the 'processFilesInDir' script with the target directory as parameter.
To automatically process all files in a directory, run the 'processFilesInDir.sh' script with the target directory as parameter.
The target directory must have the followng structure:
<target directory>/<subdirectories>/<record files>
The post processed files are stored next to the corresponding record files, with the suffix ".out" appended to the original file name.
Use the 'copyOutputAndNotes.sh' script with the target directory as parameter (again regard directory structure) to copy all post processed files and notes files to extra directories.
--- The output has the following format: ---
timestamp
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment