Bash script to check for final closing /data xml tag in file
Bash script to check for final closing </data> xml tag in file: if [ -f file.xml ] then # if grep -1iq ‘</data>’ file.xml # simplest syntax # if tac file.xml | grep -1iq ‘</data>’ # faster syntax (tac is reverse cat) if tail -100 file.xml | grep -1iq ‘</data>’ # fastest syntax, assumes at […]
Read More Bash script to check for final closing /data xml tag in file