I'm sorry!
I correct the command line of the post:
But the command:
$ cat $FILE_TMP2 | awk -v RS='><' -v OFS='>\n<' '{print $0}' > $FILE_TMP2
don't work well, because in $FILE_TMP2 this ...
Great collegues! Thanks a lot!
I'm using the next command for trim blank lines and tabs, and well-formatting all the XML tags! (ksh AIX5.3)
cat $FILE_TMP2 | awk '( NF > 0 ) { print $0 }' | sed -e 's/ //g' | sed -e 's/></>***</g' | tr -s '*' '\012' > $TMP_FILE
This is the correct order, but if I change it those dont work: the last line is lost!
The sequences is beloww:
For trimiing blank lines...
cat $FILE | awk '( NF > 0 ) { print $0 }'
For triming tabs...
| sed -e 's/ //g'
and finally, avoiding more than one xml tag in one line...
| sed -e 's/></>***</g' | tr -s '*' '\012' > $TMP_FILE
Cheers!
One more time, thanks a lot!
Xavier
