Fix bug in tools/cat bash script

This commit is contained in:
Dmitriy Simushev 2014-03-11 11:02:35 +00:00
parent 1f4414ba4f
commit 1092d60f79

View File

@ -2,11 +2,16 @@
files=$1
if [ -e $files ]
then
# Make target file empty
cat /dev/null > $2
# Attach each file from the specified mask to the target file
for file in $files
do
# Process a file only if it exists
if [ -e $file ]
then
# Append content of the current file to the target file
cat $file >> $2
done
fi
done