This is a discussion on Re: Whoto remove line feed control character from report output within the Informix forums, part of the Database Server Software category; --> If you can't remove ^M from the end of the line as part of the creation process, try this... ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| If you can't remove ^M from the end of the line as part of the creation process, try this... tr -d '\015' <INFILE >OUTFILE Regards Colin There are 10 types of people in the world, those that understand binary and those that don't >From: "Habichtsberg, Reinhard" <RHabichtsberg@arz-emmendingen.de> >To: "Informix-List (E-Mail)" <informix-list@iiug.org> >Subject: Re: Whoto remove line feed control character from report output >Date: Thu, 11 May 2006 11:04:31 +0200 > >You are talking about Carriage Return (CR, ^M, Hex 0D, Dec 13). Line Feed >(LF, ^J, Hex 0A, Dec 10) is the usual "End of line" in Unix, for example >the >row delimiter in unload files. > >^M often appears if you work with windows or DOS where "end of line" is >marked with the sequence "^M^J". How do you create your "flat file"? > >Reinhard. > > > -----Ursprüngliche Nachricht----- > > Von: informix-list-bounces@iiug.org > > [mailto:informix-list-bounces@iiug.org]Im Auftrag von Claus Samuelsen > > Gesendet am: Mittwoch, 10. Mai 2006 21:58 > > An: informix-list@iiug.org > > Betreff: Re: Whoto remove line feed control character from > > report output > > > > Franz Grutzmacher wrote: > > > Hi All > > > > > > Hope someone can help me with this little pain. > > > I am creating a output flat file for a 3rd party company. > > The file is > > > fix length 80columns. > > > After sending the file to the 3rd party I was informed that > > there is a > > > line feed character at position 81. > > > > > > Only when viewing the file in TextPad did I manage to see > > the special > > > character. In the vi editor I can't see the LF character. > > > > > > > Many newer vi editors (vim) doesn't display the line feed > > character (^M) unless you open the file with '-b' option. > > I usually remove ^M using vi command ':%s!^M!!g'. ^M is > > entered as Ctrl+V Ctrl+M > > > > > Now how do I remove this character from each line of the > > file. Can the > > > 4gl report do this for me? > > > OS= SCO > > > > > _______________________________________________ > > Informix-list mailing list > > Informix-list@iiug.org > > http://www.iiug.org/mailman/listinfo/informix-list > > >_______________________________________________ >Informix-list mailing list >Informix-list@iiug.org >http://www.iiug.org/mailman/listinfo/informix-list __________________________________________________ _______________ The new MSN Search Toolbar now includes Desktop search! http://join.msn.com/toolbar/overview |