Sponsored Content
Top Forums Shell Programming and Scripting How to get rid of double quote in sed. Post 302219102 by anakiar on Monday 28th of July 2008 05:10:57 AM
Old 07-28-2008
Hi All,

Thanks for the advice. My attention actually to grep a data from file A like below and put the ouput into file B. Currently what i am doing is i used the command below:

Data to grep.
Quote:
ids-job-identifier = "dlm_10:1:178321" dpa-job-identifier = "jqm_APJFIREWALL:779749767" logical-destination = "cbax91pc17" physical-destination = "p_cbax91pc17" job-state = "retained" job-completion-status = "success" processing-time = "1"
ids-job-identifier = "dlm_01:1:180748" dpa-job-identifier = "jqm_APJFIREWALL02:1270283169" logical-destination = "jpnx198" physical-destination = "p_jpnx198" job-state = "retained" job-completion-status = "success" processing-time = "8"
Command used:
Quote:
sed 's/.*\('"$dsmid"' = \"[^"]*\"\).*\('"$jqmid"' = \"[^"]*\"\).*\('"$ldest"' = \"[^"]*\"\).*\('"$pdest"' = \"[^"]*\"\).*\('"$jstate"' = \"[^"]*\"\).*\('"$jstatus"' = \"[^"]*\"\).*\('"$proctime"' = \"[^"]*\"\).*/\1 \2 \3 \4 \5 \6 \7/g' $logDir/$reportlogname.aim.log > $logDir/trim.$reportlogname.aim.log

The problem with this output i get double quote "". So i want to get rid of the double quote "".

Output Currently I get:
Quote:
dpa-job-identifier="jqm_APJ03:1108609378" logical-destination="hpkkdp01" job-completion-status="aborted-in-printing" processing-time="3"
dpa-job-identifier="jqm_APJ03:1108674914" logical-destination="hpkkdp01" job-completion-status="aborted-in-printing" processing-time="4"
 

9 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

single or double quote in SED

i m trying the following command but its not working: sed 's/find/\'replace\'/g' myFile but the sed enters into new line # sed 's/find/re\'place/g' myFile > I havn't any idea how to put single quote in my replace string. Your early help woud be appreciated. Thanx (2 Replies)
Discussion started by: asami
2 Replies

2. 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

3. 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

4. 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

5. 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

6. 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

7. 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

8. Shell Programming and Scripting

Replacing Double Quote in Double Quote incsv file

Hi All , We have source data file as csv file and since data could contain commas ,each attribute is quoted into double quotes.However problem is that some of the attributa data also contain double quotes which is converted to double double quote while creating csv file XLs data : ... (2 Replies)
Discussion started by: Shalini Badal
2 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
qmove(1B)								PBS								 qmove(1B)

NAME
qmove - move pbs batch job SYNOPSIS
qmove destination job_identifier ... DESCRIPTION
To move a job is to remove the job from the queue in which it resides and instantiate the job in another queue. The qmove command issues a Move Job batch request to the batch server that currently owns each job specified by job_identifier. A job in the Running , Transiting , or Exiting state cannot be moved. OPERANDS
The first operand is the new destinationfor queue @server queue@server See the PBS ERS section , "Destination Identifiers". If the destination operand describes only a queue, then qmove will move jobs into the queue of the specified name at the job's current server. If the destination operand describes only a batch server, then qmove will move jobs into the default queue at that batch server. If the destination operand describes both a queue and a batch server, then qmove will move the jobs into the specified queue at the speci- fied server. All following operands are job_identifiers which specify the jobs to be moved to the new destination. The qmove command accepts one or more job_identifier operands of the form: sequence_number[.server_name][@server] STANDARD ERROR
The qmove command will write a diagnostic messages to standard error for each error occurrence. EXIT STATUS
Upon successful processing of all the operands presented to the qmove command, the exit status will be a value of zero. If the qmove command fails to process any operand, the command exits with a value greater than zero. SEE ALSO
qsub(1B), pbs_movejob(3B) Local qmove(1B)
All times are GMT -4. The time now is 04:10 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy