SED
Removes ” from every line in the file
cat test.csv | tr -s “\”" ‘ ‘ > test2.csv
Adds a pipe in the beginning of each line:
sed ‘s/^/|/’ test2.csv >test3.csv
Adds two pipes in the end of each line:
sed ‘s/$/| |/’ test3.csv >test5.csv
#! /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

