Page 1 of 1

unwanted characters

Posted: Wed Dec 15, 2004 6:32 pm
by DSkkk
hi,
my sources are XML files and we have a style sheet and a script which convert the XML into pipelimited flat files. but when ihave some extra characters in the XML files it is still getting parsed in the same way and converting into a flat file. i need a shell script which deletes unwanted characters like a |,! etc., so that my datastage job doesn't get aborted because of this character.
thanks.

Posted: Wed Dec 15, 2004 8:03 pm
by kduke
The UNIX command is tr -d '|'. You could also use Perl or sed. The tr is designed to translate one character to another. The -d option will delete these characters.