Sponsored Content
Top Forums Shell Programming and Scripting Replacing Double Quote in Double Quote incsv file Post 302935168 by anbu23 on Friday 13th of February 2015 06:45:05 AM
Old 02-13-2015
Code:
$ cat file
"""cd""abc","cde""gh""",fig""hi"""
$ sed 's/""/"/g' file
""cd"abc","cde"gh"",fig"hi""

 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

double-quote inside double-quote

hey all, i made a simple .sh like this: echo "<style media="screen" type="text/css">@import url("main.css");</style>" but the output is: <style media=screen type=text/css>@import url(main.css);</style> i want to keep double-quotes, can anyone help me? thanks (3 Replies)
Discussion started by: indraf
3 Replies

2. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

3. Shell Programming and Scripting

Replacing the string after certain # of double quote

Could you please help in unix scripting for below scenario... In my input file, there might be a chance of having a string ( Ex:"99999") after 5th double quote for each record. I need to replace it with a space. Ex : Input : "abcdef","12345","99999","0986"... (3 Replies)
Discussion started by: vsairam
3 Replies

4. Shell Programming and Scripting

replacing a quote in some lines with multiple quote fields

i want to replace mistaken quotes in line starting with tag 300 and relocate the quote in the correct position so the input is 223;25 224;20100428064823;1;0;0;0;0;0;0;0;8;1;3;9697;18744;;;;;;;;;;;; 300;X;Event:... (3 Replies)
Discussion started by: wradwan
3 Replies

5. Shell Programming and Scripting

double quote as the delimiter

I'm trying to extract a column from a csv file with either cut or awk but some of the fields contain comma with them: "Field1","Field2, additional info","Field3",...,"Field17",... If I want to extract column 3 and use comma as the delimiter, I'll actually get the additional info bit but not... (4 Replies)
Discussion started by: ivpz
4 Replies

6. Shell Programming and Scripting

getting value between double quote

Can somebody supply me with a simple way to get a value between two double quotes? Example: input = ADR base is "/u01/app/oracle" output = /u01/app/oracle Thanks to all who answer (4 Replies)
Discussion started by: BeefStu
4 Replies

7. Shell Programming and Scripting

Double quote filenames

Hi, I need to double quotes filenames in the following string: /tmp/*file1 /tmp/*file2 /tmp/*file3 /tmp/*file4I tried to do this using sed, but it double quotes every character :wall: $ echo... (10 Replies)
Discussion started by: Subbeh
10 Replies

8. Shell Programming and Scripting

Replace double quotes with a single quote within a double quoted string

Hi Froum. I have tried in vain to find a solution for this problem - I'm trying to replace any double quotes within a quoted string with a single quote, leaving everything else as is. I have the following data: Before: ... (32 Replies)
Discussion started by: pchang
32 Replies

9. Shell Programming and Scripting

Replacing all but the first and last double quote in a line with a single quote with awk

From: 1,2,3,4,5,This is a test 6,7,8,9,0,"This, is a test" 1,9,2,8,3,"This is a ""test""" 4,7,3,1,8,"""" To: 1,2,3,4,5,This is a test 6,7,8,9,0,"This; is a test" 1,9,2,8,3,"This is a ''test''" 4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies
FIG2SXD(1)						      General Commands Manual							FIG2SXD(1)

NAME
fig2sxd - utility to convert .fig to .sxd SYNOPSIS
fig2sxd [-w] [-l(ine)w(idth)1 l] figfile sxdfile DESCRIPTION
The program tries to convert the given file in xfig format into a sxd file for OpenOffice.org Draw. If figfile ends with .fig or .xfig and sxdfile is omitted, the output file will be named like figfile ending with .sxd instead of .(x)fig. Using - for figfile makes the program read from stdin so that it is possible to use pstoedit -f fig file.ps - | fig2sxd - file.sxd to convert ps files. (For files with many objects you might want to use something like pstoedit -f 'fig:-startdepth 9999' file.ps - | fig2sxd - file.sxd to get more layers; the output of pstoedit then is no longer a valid xfig file, but it makes the z ordering of the objects in Open- Office.org Draw stay correct.) Using - for sxdfile makes the program write to stdout. With the -linewidth1 (or -lw1) option, the width of lines with thickness 1 in xfig can be set, unit is 1 cm. Using 0 here gives fine lines. Example: pstoedit -f 'fig:-startdepth 9999' file.ps - | fig2sxd -lw1 0 - file.sxd With the -w option, out-of-specification values are only warnings but will be sanitized. DEFICIENCIES
Not all of the .fig objects are converted correctly: splines look quite similar, but are not exactly the same; text placement might be a little bit wrong, especially for very small font sizes; hatches look different in many cases; hollow arrows are not supported and replaced by their filled counterparts. There are various other things that could be improved. It looks like OpenOffice.org cannot read xml attribute values longer than 64kB as they might appear for very long polygons/-lines. For unfilled polylines, fig2sxd therefore creates several smaller polylines of 500 points each and groups them together. Splitting an arbitrary filled polygon is not trivial and not implemented. SEE ALSO
pstoedit(1), xfig(1) and http://fig2sxd.sourceforge.net/ (for updates). AUTHOR
Program and manual page were written by Alexander Burger <acfb@users.sourceforge.net>. FIG2SXD(1)
All times are GMT -4. The time now is 03:02 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy