mirror of
https://github.com/Mibew/mibew.git
synced 2025-05-08 13:33:06 +03:00
Fix bug in tools/cat bash script
This commit is contained in:
parent
1f4414ba4f
commit
1092d60f79
@ -2,11 +2,16 @@
|
|||||||
|
|
||||||
files=$1
|
files=$1
|
||||||
|
|
||||||
if [ -e $files ]
|
# Make target file empty
|
||||||
then
|
cat /dev/null > $2
|
||||||
cat /dev/null > $2
|
|
||||||
for file in $files
|
# Attach each file from the specified mask to the target file
|
||||||
do
|
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
|
cat $file >> $2
|
||||||
done
|
fi
|
||||||
fi
|
done
|
Loading…
Reference in New Issue
Block a user