Sponsored Content
Full Discussion: New Member - First Question
Top Forums Shell Programming and Scripting New Member - First Question Post 302396479 by varefump on Thursday 18th of February 2010 02:15:11 PM
Old 02-18-2010
New Member - First Question

Here is my situation...

System - HP UNIX (HP-UX hq5 B.11.00 U 9000/800 (td))

I have an HL7 (Health Level Seven) pipe-delimied file that does not have any carriage returns/line feeds. I need to insert a line feed before each segment type (MSH, PID, PV1, OBX, etc.) so that my PROGRESS program can read each line and determine the segment type for processing.

Input file looks like this:

Code:
MSH|data|data|data|data|data|data|data|PID|data|data|data|data|PV1|data|data|OBX|data|data|...

I need a command (I've tried sed) to convert the file to look like this:

Code:
MSH|data|data|data|data|data|data|data|
PID|data|data|data|data|
PV1|data|data|
OBX|data|data|...

If anyone can give me a command to do this, I will be most grateful.

Last edited by zxmaus; 02-18-2010 at 03:37 PM.. Reason: added code tags
 

7 More Discussions You Might Find Interesting

1. Post Here to Contact Site Administrators and Moderators

member titles

I must have missed it , but what do Junior Memeber/Member mean? is there a reference arounf for the significance of these titles ? Thanks, Hezki (3 Replies)
Discussion started by: me2unix
3 Replies

2. Solaris

new member

As a new member how do I go about asking question to the administrator and other users (1 Reply)
Discussion started by: malusims
1 Replies

3. Post Here to Contact Site Administrators and Moderators

Who is The First Member !!!

Hello Admins Just tell me who is the first member of this forum. Regards, Awadhesh (1 Reply)
Discussion started by: Awadhesh
1 Replies

4. UNIX for Dummies Questions & Answers

new member need help

brothers and sisters iam a new member of your respectful forum hope to accept me i really would like to an expert in unix and linux so please tell me how could ? and what i should have ? i want to make my project in these subject but i dont know what to do and which... (12 Replies)
Discussion started by: yemen
12 Replies

5. UNIX for Dummies Questions & Answers

New Member

HI Bruce from Central PA I have never used Unix but am sick of Microsoft so want to learn it. I use to own a computer store front and training center and stated our with Atari, Commodore and the 1st PC and MS/DOS then Windows BUT sick of Microsoft controlling the computer industry. ... (2 Replies)
Discussion started by: Brucec
2 Replies

6. What is on Your Mind?

new member

i am new member i hope here is good friends (1 Reply)
Discussion started by: annsoo
1 Replies

7. What is on Your Mind?

New member

Hi guys! My name is Leonida and I am new here to this forum. Nice meeting you all. (1 Reply)
Discussion started by: leeoona
1 Replies
URI::data(3)						User Contributed Perl Documentation					      URI::data(3)

NAME
URI::data - URI that contains immediate data SYNOPSIS
use URI; $u = URI->new("data:"); $u->media_type("image/gif"); $u->data(scalar(`cat camel.gif`)); print "$u "; open(XV, "|xv -") and print XV $u->data; DESCRIPTION
The "URI::data" class supports "URI" objects belonging to the data URI scheme. The data URI scheme is specified in RFC 2397. It allows inclusion of small data items as "immediate" data, as if it had been included externally. Examples: data:,Perl%20is%20good data:image/gif;base64,R0lGODdhIAAgAIAAAAAAAPj8+CwAAAAAI AAgAAAClYyPqcu9AJyCjtIKc5w5xP14xgeO2tlY3nWcajmZZdeJcG Kxrmimms1KMTa1Wg8UROx4MNUq1HrycMjHT9b6xKxaFLM6VRKzI+p KS9XtXpcbdun6uWVxJXA8pNPkdkkxhxc21LZHFOgD2KMoQXa2KMWI JtnE2KizVUkYJVZZ1nczBxXlFopZBtoJ2diXGdNUymmJdFMAADs= "URI" objects belonging to the data scheme support the common methods (described in URI) and the following two scheme-specific methods: $uri->media_type( [$new_media_type] ) Can be used to get or set the media type specified in the URI. If no media type is specified, then the default "text/plain;charset=US-ASCII" is returned. $uri->data( [$new_data] ) Can be used to get or set the data contained in the URI. The data is passed unescaped (in binary form). The decision about whether to base64 encode the data in the URI is taken automatically, based on the encoding that produces the shorter URI string. SEE ALSO
URI COPYRIGHT
Copyright 1995-1998 Gisle Aas. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.18.2 2012-02-11 URI::data(3)
All times are GMT -4. The time now is 04:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy