diff --git a/bin/1.2_filter_motifs/compareBed.sh b/bin/1.2_filter_motifs/compareBed.sh index 7cf0017..2c4c9ba 100644 --- a/bin/1.2_filter_motifs/compareBed.sh +++ b/bin/1.2_filter_motifs/compareBed.sh @@ -176,7 +176,8 @@ then echo "directory $workdir does not exist. Please check parameter -w / --workdir" exit 1 fi -if [[ ${output: -4: -1} != '.bed' ]] +# check if output path ends with .bed. If not, the filename is extended by ".bed" +if [[ ${output: -4} != '.bed' ]] then output=`echo $output | sed "s|$|.bed|g"` fi