SED

#! /bin/bash

# Removes a backslash and the following endline from properties in the section.properties files.

if [ ! $1 ]; then
echo “Missing path to directory containing section.properties files.”
exit 1
fi

# Find section.properties files, doesn’t follow symbolic links
declare FILES=$(find -H -name “section.properties” 2>/dev/null)
#echo $FILES

# Loop through the section.properties files
for propfile in $FILES; do
#echo $propfile “\n”
# sed -e ‘:more; N; s/\\\n//g; tmore;’ $propfile #| less > $propfile
sed -i ‘:a;N;$!ba;s/\\\n//g’ $propfile
done