Re: [U2] Stripping line breaks from InfoTrieve output
Thanks, Larry. > > You should be able to shorten the tr and save a pipe ... > > tr -d ['\r\n'] < brad.txt > brad2.txt > > Larry Hiscock > Western Computer Services U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stripping line breaks from InfoTrieve output
You should be able to shorten the tr and save a pipe ... tr -d ['\r\n'] < brad.txt > brad2.txt Larry Hiscock Western Computer Services > Thanks for the ideas. dd scared me. Lots of warnings about destroying your > hard drive. =:O > > I figured it out with tr. There might be a way to do it in one step, but > piping works fine. > > tr -d '\r' < brad.txt | tr -d '\n' > brad2.txt > > > U.S. BANCORP made the following annotations > - > Electronic Privacy Notice. This e-mail, and any attachments, contains > information that is, or may be, covered by electronic communications > privacy laws, and is also confidential and proprietary in nature. If you > are not the intended recipient, please be advised that you are legally > prohibited from retaining, using, copying, distributing, or otherwise > disclosing this information in any manner. Instead, please reply to the > sender that you have received this communication in error, and then > immediately delete it. Thank you in advance for your cooperation. > > > > - > > ___ > U2-Users mailing list > U2-Users@listserver.u2ug.org > http://listserver.u2ug.org/mailman/listinfo/u2-users > ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stripping line breaks from InfoTrieve output
Thanks for the ideas. dd scared me. Lots of warnings about destroying your hard drive. =:O I figured it out with tr. There might be a way to do it in one step, but piping works fine. tr -d '\r' < brad.txt | tr -d '\n' > brad2.txt U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stripping line breaks from InfoTrieve output
Sounds like a job for the old AIX "dd" to me Colin Alfke wrote: When creating the file he would need to use WRITEBLK... :) The "TO" syntax will create an Aix file using the Aix linefeed char (10 or 13 - it's been a while). You will have to then have to join the lines together in the format required. It's whichever you find easiest - or is easier for the next guy to support Hth Colin -Original Message- From: Marc A Hilbert Sent: December 12, 2012 5:59 PM To: 'U2 Users List' Subject: Re: [U2] Stripping line breaks from InfoTrieve output Brad, I know nothing about infotrieve, but why can't you use OPENSEQ and then a READBLK loop? READBLK reads the next N bytes from a file, not caring if there are line delimiters of other strange characters. Regards, Marc -Mensaje original- De: bradley.sch...@usbank.com Enviado el: miércoles, 12 de diciembre de 2012 18:19 Para: U2 Users List Asunto: [U2] Stripping line breaks from InfoTrieve output I'm guessing it doesn't matter if this is UD or UV, but I have UD7.1 under AIX. We have a request to extract some data to what I call a tape file. The data is fixed length and there are no line breaks. Just one continuous stream of data. My thought is that this could be accomplished with an InfoTrieve using 'list TO' as in list AGREEMENT F1 F2 TO file.txt There is of course more to it than this, but if I can strip out whatever creates the line break, I think I can do what I need. So my question to the group is: what character(s) are create the new line when ouptutted from an InfoTrieve? Has anyone done this before? I'm thinking I'd used tr or sed to clean things up. Thanks Brad ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users -- Jeff Schasny - Denver, Co, USA jschasny at gmail dot com ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stripping line breaks from InfoTrieve output
When creating the file he would need to use WRITEBLK... :) The "TO" syntax will create an Aix file using the Aix linefeed char (10 or 13 - it's been a while). You will have to then have to join the lines together in the format required. It's whichever you find easiest - or is easier for the next guy to support Hth Colin -Original Message- From: Marc A Hilbert Sent: December 12, 2012 5:59 PM To: 'U2 Users List' Subject: Re: [U2] Stripping line breaks from InfoTrieve output Brad, I know nothing about infotrieve, but why can't you use OPENSEQ and then a READBLK loop? READBLK reads the next N bytes from a file, not caring if there are line delimiters of other strange characters. Regards, Marc -Mensaje original- De: bradley.sch...@usbank.com Enviado el: miércoles, 12 de diciembre de 2012 18:19 Para: U2 Users List Asunto: [U2] Stripping line breaks from InfoTrieve output I'm guessing it doesn't matter if this is UD or UV, but I have UD7.1 under AIX. We have a request to extract some data to what I call a tape file. The data is fixed length and there are no line breaks. Just one continuous stream of data. My thought is that this could be accomplished with an InfoTrieve using 'list TO' as in list AGREEMENT F1 F2 TO file.txt There is of course more to it than this, but if I can strip out whatever creates the line break, I think I can do what I need. So my question to the group is: what character(s) are create the new line when ouptutted from an InfoTrieve? Has anyone done this before? I'm thinking I'd used tr or sed to clean things up. Thanks Brad ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] Stripping line breaks from InfoTrieve output
Brad, I know nothing about infotrieve, but why can't you use OPENSEQ and then a READBLK loop? READBLK reads the next N bytes from a file, not caring if there are line delimiters of other strange characters. Regards, Marc -Mensaje original- De: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] En nombre de bradley.sch...@usbank.com Enviado el: miércoles, 12 de diciembre de 2012 18:19 Para: U2 Users List Asunto: [U2] Stripping line breaks from InfoTrieve output I'm guessing it doesn't matter if this is UD or UV, but I have UD7.1 under AIX. We have a request to extract some data to what I call a tape file. The data is fixed length and there are no line breaks. Just one continuous stream of data. My thought is that this could be accomplished with an InfoTrieve using 'list TO' as in list AGREEMENT F1 F2 TO file.txt There is of course more to it than this, but if I can strip out whatever creates the line break, I think I can do what I need. So my question to the group is: what character(s) are create the new line when ouptutted from an InfoTrieve? Has anyone done this before? I'm thinking I'd used tr or sed to clean things up. Thanks Brad U.S. BANCORP made the following annotations - Electronic Privacy Notice. This e-mail, and any attachments, contains information that is, or may be, covered by electronic communications privacy laws, and is also confidential and proprietary in nature. If you are not the intended recipient, please be advised that you are legally prohibited from retaining, using, copying, distributing, or otherwise disclosing this information in any manner. Instead, please reply to the sender that you have received this communication in error, and then immediately delete it. Thank you in advance for your cooperation. - ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users