Sponsored Content
Top Forums Shell Programming and Scripting Removing " from a text using awk Post 302867463 by disedorgue on Thursday 24th of October 2013 08:50:11 AM
Old 10-24-2013
Hi,
If you use the commutator &:
Code:
awk '{gsub(/[^\\]"/,"&\"");gsub(/""/,"")}1' file

Regards.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Explain the line "mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'`"

Hi Friends, Can any of you explain me about the below line of code? mn_code=`env|grep "..mn"|awk -F"=" '{print $2}'` Im not able to understand, what exactly it is doing :confused: Any help would be useful for me. Lokesha (4 Replies)
Discussion started by: Lokesha
4 Replies

2. Shell Programming and Scripting

Removing " " chars using Awk

HI Friends, I am trying to elliminate the " " characters from the word: "hello" using awk. I need the output to be just = hello (without " " chars). Is there any way to do this ? Thanks! (3 Replies)
Discussion started by: vijaya2006
3 Replies

3. Shell Programming and Scripting

removing the "\" and "\n" character using sed or tr

Hi All, I'm trying to write a ksh script to parse a file. When the "\" character is encountered, it should be removed and the next line should be concatenated with the current line. For example... this is a test line #1\ should be concatenated with line #2\ and line number 3 when this... (3 Replies)
Discussion started by: newbie_coder
3 Replies

4. Shell Programming and Scripting

Extract text between two specified "constant" texts using awk

Hi All, From the title you may know that this question has been asked several times and I have done lot of Googling on this. I have a Wikipedia dump file in XML format. All the contents are in one XML file i.e. all different topics have been put in one XML file. Now I need to separate them and... (1 Reply)
Discussion started by: shoaibjameel123
1 Replies

5. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

6. Shell Programming and Scripting

Removing "^M" from the end of a String (i.e. "Ctrl+M")?

Hello All, I have an Expect script that ssh's to a remote server and runs some commands before exiting. One of the commands I run is the "hostname" Command. After I run this command I save the output using this line in the code below... Basically it executes the hostname command, then I... (2 Replies)
Discussion started by: mrm5102
2 Replies

7. Shell Programming and Scripting

Difference between /text/ and "text" in awk

Why does this search give different result in awk I do see a mix of this in the example around the net. What to use and why? data 1 = red 2 = green 3 = blue 4 = black awk '$3 == /blue/' data "no result" awk '$3 == "blue"' data 3 = blue awk '$3 ~ /blue/' data 3 = blue (9 Replies)
Discussion started by: Jotne
9 Replies

8. UNIX for Dummies Questions & Answers

Removing PATTERN from txt without removing lines and general text formatting

Hi Everybody! First post! Totally noobie. I'm using the terminal to read a poorly formatted book. The text file contains, in the middle of paragraphs, hyphenation to split words that are supposed to be on multiple pages. It looks ve -- ry much like this. I was hoping to use grep -v " -- "... (5 Replies)
Discussion started by: AxeHandle
5 Replies

9. Shell Programming and Scripting

awk - help in removing some text

Hey Guys, Earlier I asked a question under Solaris, which I got great help... thanks. Although I got the script working for what it really needed to do, I am looking for a bit of help to change the output for nicer reading. my script gets a list of zones under a global-zone and puts this... (4 Replies)
Discussion started by: dakelly
4 Replies

10. UNIX for Beginners Questions & Answers

Awk: Performing "for" loop within text block with two files

I am hoping to pull multiple strings from one file and use them to search within a block of text within another file. File 1PS001,001 HLK PS002,004 MWQ PS004,002 RXM PS004,006 DBX PS004,006 SBR PS005,007 ML PS005,009 DBR PS005,011 MR PS005,012 SBR PS006,003 RXM PS006,003 >SJ PS006,010... (11 Replies)
Discussion started by: jvoot
11 Replies
CISS(4) 						   BSD Kernel Interfaces Manual 						   CISS(4)

NAME
ciss -- HP/Compaq Smart ARRAY 5/6 RAID controllers SYNOPSIS
ciss* at pci? function ? DESCRIPTION
The ciss driver provides support for the CISS interface implemented by fifth and later generations of the HP/Compaq Smart ARRAY family of controllers. The CISS interface is defined in the document entitled CISS Command Interface for SCSI-3 Support Open Specification, Version 1.04, Valence Number 1, Compaq Computer Corporation, 2000/11/27. This driver supports several Compaq and HP controllers implementing the CISS interface, including: o Compaq Smart Array 5300 version 1 o Compaq Smart Array 5300 version 2 o Compaq Smart Array 5i version 1 o Compaq Smart Array 5i version 2 o HP Smart Array 5312 o HP Smart Array 6i o HP Smart Array 641 o HP Smart Array 642 o HP Smart Array 6400 o HP Smart Array 6400 EM o HP Smart Array E200 o HP Smart Array E200i o HP Smart Array P400 o HP Smart Array P400i o HP Smart Array P600 o HP Smart Array P800 o HP Smart Array V100 o HP Smart Array 1 through 13 These controllers support RAID 0, RAID 1, RAID 5, JBOD, and superpositions of those configurations. Although the controllers are actual RAID controllers, the ciss driver makes them look just like SCSI controllers. All RAID configuration must be done through the controllers' BIOSes. Hardware from previous generations of this product family may be supported by the cac(4) driver. SEE ALSO
bio(4), cac(4), intro(4), pci(4), scsi(4), sd(4) HISTORY
The ciss driver first appeared in NetBSD 3.1. AUTHORS
The ciss driver was written by Michael Shalayeff <mickey@openbsd.org>, and ported to NetBSD by Tonnerre Lombard <tonnerre@netbsd.org>. BSD
May 28, 2008 BSD
All times are GMT -4. The time now is 04:18 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy