Sponsored Content
Top Forums Shell Programming and Scripting Remove pipe(|) symbol in except the ones which are enclosed in double quotes Post 302948068 by Aia on Thursday 25th of June 2015 11:35:29 AM
Old 06-25-2015
Would that work?
Code:
sed -e 's/"|"/@@/g; s/|//g; s/@@/"|"/g' data_file_name

 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

How to remove a character which is enclosed in Double quotes

I want to remove the comma which is present within the double quoted string. All other commas which is present outside double quotes should be present. Input : a,b,"cc,dd,ee",f,ii,"jj,kk",mmm output : a,b,"ccddee",f,ii,"jjkk",mmm (3 Replies)
Discussion started by: mohan_tuty
3 Replies

2. Shell Programming and Scripting

remove verticalbar or pipe symbol

hi guys i have 6000 rows column the text in the column has the symbol vertical bar |. i tried some of the commands to remove it but none of the commands are reconzng this symbol. would u plz help to remove this symbol from the text with any kind of unix command u r help would be appreciated ... (9 Replies)
Discussion started by: bogu0001
9 Replies

3. Shell Programming and Scripting

To Replace comma with Pipe inside double quotes

Hi, I have a requirement to replace the comma's inside the double quotes. The comma's inside the double quotes will get changed dynamically. Input Record: "Washington, DC,Prabhu,aju",New York Output Record: "Washington| DC|Prabhu|aju",New York I tried with the below command but it... (3 Replies)
Discussion started by: prabhutkl
3 Replies

4. Shell Programming and Scripting

removing extra double quotes between pipe dilimeter

I have a flat file sample like this - "COURSE"|"ddddd " " dddd"|"sssddd sdsdsdsdx" dddddddd ffffff "aaaaa" dddddddd ffffff sdsdsd"|"xxxxxxx"| "COURSE"|"ffff " " bbbb"|"lllll"| The delimiter is pipe character (|) and the text are enclosed in double quotes... (5 Replies)
Discussion started by: vishalzone
5 Replies

5. Shell Programming and Scripting

How to remove characters enclosed in single quotes?

How to remove characters enclosed in single quotes? My data is something like this (03/22/2011 08:17:26.650) : ( -> '1' -> '1-1-3' -> '6' -> '1' -> 'SALMOR58BB4' aaaaa bbbbbb ccccc ((dddd)) I want the output to be (03/22/2011 08:17:26.650) : ( -> -> -> -> -> aaaaa... (2 Replies)
Discussion started by: rdhanek
2 Replies

6. Shell Programming and Scripting

Convert csv to pipe delimited except the ones in double quotes

I have a csv data file : A,B,C,D,"A,B",E,"GG,H" E,F,G,H,I,J,"S,P" I need to replace all "," with "|" except the ones between double quotes i.e A|B|C|D|"A,B"|E|"GG,H" E|F|G|H|I|J|"S,P" CAn someone assist? (8 Replies)
Discussion started by: Shivdatta
8 Replies

7. Shell Programming and Scripting

Remove whitespace after pipe symbol but not inside words

I have a file that looks like this: 102| #2 X 1/4-INCH| 30188| EA| FTW| A| NOT SERIAL TRACKING| NOT LOT TRACKING| TRUE| #2 X 1/4-INCH 102| #2 X 1/4-INCH| 30188| EA| VPS| A| NOT SERIAL TRACKING| NOT LOT TRACKING| TRUE| #2 X 1/4-INCH 102| #6 X 1/2"| ... (2 Replies)
Discussion started by: djehresmann
2 Replies

8. Shell Programming and Scripting

Trying to remove double quotes

Hi, I am little new to forum and new on unix side. I have a small issue below: I am reading a file that has 5 columns something like below. col1,col2,col3,col4,col5 Some records are having double quoted values something like below: "value1","value2","value3","value4","value5" I need... (8 Replies)
Discussion started by: Saanvi1
8 Replies

9. Shell Programming and Scripting

How to delete the commas in a .CSV file that are enclosed in a string with double quotes?

Okay, I would like to delete all the commas in a .CSV file (TEST.CSV) or at least substitute them with empty space, that are enclosed in double quote. Please see the sample file as below: column 1,column 2,column 3,column 4,column 5,column 6,column 7,column 8,column 9,column 10... (8 Replies)
Discussion started by: dhruuv369
8 Replies

10. Shell Programming and Scripting

Remove pipe(|) symbol ina file, except the ones which are enclosed in double quotes

I have file with are delimited by pipe(|) symbol, I wanted those to be removed except the ones which are enclosed in double quotes. If your quote file is: |Life is |Beautiful"|"Indeed life |is beautiful too|"|"But unix is fun| is not"|" It should return: Life is Beautiful"|"Indeed life is... (1 Reply)
Discussion started by: Sathyapts
1 Replies
GAMMA(3)						User Contributed Perl Documentation						  GAMMA(3)

NAME
PDL::GSLSF::GAMMA - PDL interface to GSL Special Functions DESCRIPTION
This is an interface to the Special Function package present in the GNU Scientific Library. SYNOPSIS
Functions FUNCTIONS
gsl_sf_lngamma Signature: (double x(); double [o]y(); double [o]s(); double [o]e()) Log[Gamma(x)], x not a negative integer Uses real Lanczos method. Determines the sign of Gamma[x] as well as Log[|Gamma[x]|] for x < 0. So Gamma[x] = sgn * Exp[result_lg]. gsl_sf_gamma Signature: (double x(); double [o]y(); double [o]e()) Gamma(x), x not a negative integer gsl_sf_gammastar Signature: (double x(); double [o]y(); double [o]e()) Regulated Gamma Function, x > 0 Gamma^*(x) = Gamma(x)/(Sqrt[2Pi] x^(x-1/2) exp(-x)) = (1 + 1/(12x) + ...), x->Inf gsl_sf_gammainv Signature: (double x(); double [o]y(); double [o]e()) 1/Gamma(x) gsl_sf_lngamma_complex Signature: (double zr(); double zi(); double [o]x(); double [o]y(); double [o]xe(); double [o]ye()) Log[Gamma(z)] for z complex, z not a negative integer. Calculates: lnr = log|Gamma(z)|, arg = arg(Gamma(z)) in (-Pi, Pi] gsl_sf_taylorcoeff Signature: (double x(); double [o]y(); double [o]e(); int n) x^n / n! gsl_sf_fact Signature: (x(); double [o]y(); double [o]e()) n! gsl_sf_doublefact Signature: (x(); double [o]y(); double [o]e()) n!! = n(n-2)(n-4) gsl_sf_lnfact Signature: (x(); double [o]y(); double [o]e()) ln n! gsl_sf_lndoublefact Signature: (x(); double [o]y(); double [o]e()) ln n!! gsl_sf_lnchoose Signature: (n(); m(); double [o]y(); double [o]e()) log(n choose m) gsl_sf_choose Signature: (n(); m(); double [o]y(); double [o]e()) n choose m gsl_sf_lnpoch Signature: (double x(); double [o]y(); double [o]s(); double [o]e(); double a) Logarithm of Pochammer (Apell) symbol, with sign information. result = log( |(a)_x| ), sgn = sgn( (a)_x ) where (a)_x := Gamma[a + x]/Gamma[a] gsl_sf_poch Signature: (double x(); double [o]y(); double [o]e(); double a) Pochammer (Apell) symbol (a)_x := Gamma[a + x]/Gamma[x] gsl_sf_pochrel Signature: (double x(); double [o]y(); double [o]e(); double a) Relative Pochammer (Apell) symbol ((a,x) - 1)/x where (a,x) = (a)_x := Gamma[a + x]/Gamma[a] gsl_sf_gamma_inc_Q Signature: (double x(); double [o]y(); double [o]e(); double a) Normalized Incomplete Gamma Function Q(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,x,Infinity} ] gsl_sf_gamma_inc_P Signature: (double x(); double [o]y(); double [o]e(); double a) Complementary Normalized Incomplete Gamma Function P(a,x) = 1/Gamma(a) Integral[ t^(a-1) e^(-t), {t,0,x} ] gsl_sf_lnbeta Signature: (double a(); double b(); double [o]y(); double [o]e()) Logarithm of Beta Function Log[B(a,b)] gsl_sf_beta Signature: (double a(); double b();double [o]y(); double [o]e()) Beta Function B(a,b) AUTHOR
This file copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it> All rights reserved. There is no warranty. You are allowed to redistribute this software / documentation under certain conditions. For details, see the file COPYING in the PDL distribution. If this file is separated from the PDL distribution, the copyright notice should be included in the file. The GSL SF modules were written by G. Jungman. perl v5.8.0 2003-01-29 GAMMA(3)
All times are GMT -4. The time now is 03:21 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy