Sponsored Content
Top Forums Shell Programming and Scripting Delimiter Conversion(Generic Code) Post 302747989 by Arun Mishra on Monday 24th of December 2012 04:04:57 AM
Old 12-24-2012
Power Delimiter Conversion(Generic Code)

Hi All,

I am looking for a generic code which can search for the existing delimiter(what ever it may be) in a file and convert it to Pipeline. The file may have Pipeline delimiter already in that case just leave it. Please find below some sample records.
Sample records1:
HTML Code:
IMSDR,"Competitive,Segment","Decile_Augmented","Speicalty","In_Current_STP","MCR_Target","MCRO_Target","CVAS_Target","PR_Target","OCEAN_Target"
"0000230","GENERIC",9,"PCP","Y","Y","N","N","N","N"
"0000326","GENERIC",7,"PCP","Y","Y","N","N","N","Y"
"0000340","HIGH CRESTOR",6,"PCP","Y","Y","N","N","N","N"
Sample records2:
HTML Code:
IMS Model Type|Retail Method of Payment
CASH|CASH
FFS MED|MEDICAID
MEDICAID |COMMERCIAL THIRD PARTY
MGD MEDI|COMMERCIAL THIRD PARTY
CHIP|COMMERCIAL THIRD PARTY
MED B |COMMERCIAL THIRD PARTY
I need to make sure the headers are removed.
Any help as always appreciated.
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Code conversion from JSP to PYTHON

Guys I need to convert a code from JSP (Java Tags are also there inside JSP) to PYTHON. I have OK kind of knowledge in PYTHON, but dont have a muck knowledge in JAVA/JSP. Any idea how to approach? Thanks in advance to all C Saha (1 Reply)
Discussion started by: csaha
1 Replies

2. Solaris

Generating a generic incremental code

Hi Gurus, I have several Solaris systems (say system a, system b,system c) which will connect to a windows system (system Z) using SFTP session. I have a 'txt' file on System Z , which has a simple numeric value on it(say 1) , If I have to increment this number with 1 (1+1 =2) irrespective of... (3 Replies)
Discussion started by: ramky79
3 Replies

3. Shell Programming and Scripting

Substring based on delimiter, finding last delimiter

Hi, I have a string like ABC.123.XYZ-A1-B2-P1-C4. I want to delimit the string based on "-" and then get result as only two strings. One with string till last hyphen and other with value after last hyphen... For this case, it would be something like first string as "ABC.123.XYZ-A1-B2-P1" and... (6 Replies)
Discussion started by: gupt_ash
6 Replies

4. Shell Programming and Scripting

Conversion of '|' delimiter

Hello All, I want to convert the data saparated by '|' delimited in the flat file to the readable format. The every odd number '|' (pipe) to be converted to '\tab' and every even numbered '|' to '\n' and transfer the data to another file. example. ... (12 Replies)
Discussion started by: ssachins
12 Replies

5. UNIX for Advanced & Expert Users

Conversion from ASCII to binary for physical simulation code in C/C++

Good evening, everybody A good math friend told me that it would be possible to shrink the size of the numerical datas I produce with a physical simulation code I programmed for my PhD. It usually writes at least 100 GB to complete the simulation, and it seems that it is too high. There are... (7 Replies)
Discussion started by: Cybertib
7 Replies

6. Shell Programming and Scripting

How to cut by delimiter, and delimiter can be anything except numbers?

Hi all, I have a number of strings like below: //mnt/autocor/43°13'(33")W/ and i'm trying to get the numbers in this string, for example 431333 please help thanks ahead (14 Replies)
Discussion started by: sunnydanniel
14 Replies

7. Shell Programming and Scripting

conversion of code in perl and python

How to convert below bash code in perl and python. for BLOCK in /sys/block/emcpow* do echo "100000" > "$BLOCK"/queue/nr_requests echo "noop" > "$BLOCK"/queue/scheduler done (2 Replies)
Discussion started by: learnbash
2 Replies

8. Shell Programming and Scripting

Shell script to put delimiter for a no delimiter variable length text file

Hi, I have a No Delimiter variable length text file with following schema - Column Name Data length Firstname 5 Lastname 5 age 3 phoneno1 10 phoneno2 10 phoneno3 10 sample data - ... (16 Replies)
Discussion started by: Gaurav Martha
16 Replies

9. Shell Programming and Scripting

Perl Code to change file delimiter (passed as argument) to bar delimiter

Hi, Extremely new to Perl scripting, but need a quick fix without using TEXT::CSV I need to read in a file, pass any delimiter as an argument, and convert it to bar delimited on the output. In addition, enclose fields within double quotes in case of any embedded delimiters. Any help would... (2 Replies)
Discussion started by: JPB1977
2 Replies
PMERR(1)						      General Commands Manual							  PMERR(1)

NAME
pmerr - translate Performance Co-Pilot error codes into error messages SYNOPSIS
pmerr code ... pmerr -l DESCRIPTION
pmerr accepts standard Performance Co-Pilot (PCP) error codes via the code argument(s) and generates the corresponding error text. Each code may be an integer, a hexadecimal value or a hexadecimal value prefixed by either ``0x'' or ``0X''. Error codes must be less than zero, so if code is a positive number, a warning message is produced, and the negated value is used. The alternative use of the -l option causes all known error codes to be listed, along with their symbolic names and error text. PCP ENVIRONMENT
Environment variables with the prefix PCP_ are used to parameterize the file and directory names used by PCP. On each installation, the file /etc/pcp.conf contains the local values for these variables. The $PCP_CONF variable may be used to specify an alternative configura- tion file, as described in pcp.conf(5). SEE ALSO
PMAPI(3), pmErrStr(3), pcp.conf(5) and pcp.env(5). Performance Co-Pilot PCP PMERR(1)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy