Skip to Content
0
Former Member
Nov 23, 2011 at 01:37 PM

Removing carriage return from the last line of a file

1006 Views

Hi All,

I have a requirement whereby the last occuring carriage return in a file, produced from a receiver communication channel, should be removed in order for the file produced to be successfully integrated into the target system.

Currently

Line 1 CR

Line 2 CR

Line 3 CR

<- Cursor pointing on new line

Should be:

Line 1 CR

Line 2 CR

Line 3

Line.endSeparator = 'nl'

I have tried isolating the last line in the mapping with the hope of changing the 'LastLine.endSeparator' but in vain; still a carriage return present.

I was wandering whether a shell script might exist for doing this?!? Or Xslt Mapping? Or custom file receiver adapter?

Would anyone have any idea?

Thanks in advance.

Vincent