While the how of doing this would depend on your editor of choice, 
functionally, all you need to do is globally replace all of the "new line" 
characters with nothing and then globally replace all of the segment 
terminators with the same character followed by a "new line".

I think in "VI", it'd be something like:
s/<search-string>/<replace-string>/g

Where "/n" is the new line character and the file uses a tilde (~) as a segment 
terminator.

s/\n//g
s/~/~/n/g

Sorry if that's not the exact formatting, but I'm not a Unix person.

-----Original Message-----
From: [email protected] on behalf of Bev Hyer
Sent: Fri 11/7/2008 1:30 PM
To: [email protected]
Cc: Brad Gilker
Subject: FW: [EDI-L] Re:<tech> Wrap/Unwrap Utility
 

We are looking for a utility that will run on a Unix box (Solaris to be 
specific) that will take a wrapped x12 file (either 80 character or 255 
characters wrapping) and unwrap the data to be one segment per line. Segments 
in the unwrapped file which originally spanned two lines need to now be on a 
single line.

Does anyone know of a utility or set of Unix commands to perform this? Or Java 
that will run on Unix. And does anyone know of a utility that will wrap a file?


_______________________________________
Bev  Hyer
Developer Analyst - EDI Gateway
TELUS Business Transformation - Information Services
10020-100 St,    Floor 11
Edmonton,  AB  T5J 0N5
*:  (780) 493-5405  *: (780) 717-0117
*:  [EMAIL PROTECTED]<mailto:[EMAIL PROTECTED]>




[Non-text portions of this message have been removed]




[Non-text portions of this message have been removed]


------------------------------------

...
Please use the following Message Identifiers as your subject prefix: <SALES>, 
<JOBS>, <LIST>, <TECH>, <MISC>, <EVENT>, <OFF-TOPIC>

Job postings are welcome, but for job postings or requests for work: <JOBS> IS 
REQUIRED in the subject line as a prefix.Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/EDI-L/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/EDI-L/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:[EMAIL PROTECTED] 
    mailto:[EMAIL PROTECTED]

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/

Reply via email to