print strings as single lines for easy comparison

This commit is contained in:
Eric House 2011-09-13 18:18:13 -07:00
parent b0e6f24bda
commit 75aaec676c

View file

@ -22,7 +22,12 @@ list_ids() {
list_pairs() {
XML_FILE=$1
xmlstarlet sel -T -t -m "/resources/string" -v "concat(.,'|')" -n $XML_FILE
#xmlstarlet sel -t -m "//string" -v @name -o ':' -v . -n $XML_FILE | tr -d '\n' | sed 's, *, ,g'
for NAME in $(list_ids $XML_FILE); do
xmlstarlet sel -t -m "//string[@name='$NAME']" -v @name -o ':' -v . $XML_FILE \
| tr -d '\n' | sed 's, *, ,g'
echo ""
done
}
while [ $# -gt 0 ]; do