Search Results

Search: Posts Made By: vivek d r
1,010
Posted By vivek d r
Parsing custom data into xml in Shell
Hi ,
I have data as below in a text file


{
'AAA' => {
'A1' => 'a1 comment',
'A2' => 'a2 comment'
},
'BBB' => {
'B1' => 'b1 comment'
},
'CCC' => {
...
35,066
Posted By vivek d r
sed command to replace a line in a file using line number from the output of a pipe.
Sed command to replace a line in a file using line number from the output of a pipe.



Is it possible to replace a whole line piped from someother command into a file at paritcular line...

...
1,572
Posted By vivek d r
thanks :-) its working.. not able to copy paste...
thanks :-) its working.. not able to copy paste again. hence attaching file. The page just expires if i copy paste something :-(
1,572
Posted By vivek d r
sed command to replace two character pattern with another pattern
Not able to paste my content. Please see the attachment :-(
1,973
Posted By vivek d r
it should delete with parenthesis and a comma at...
it should delete with parenthesis and a comma at the end. Basically this whole below content must be deleted from that file.

('word1','word2','word3','anything','word4', whatever),
1,973
Posted By vivek d r
sed command to delete a pattern in a file
Hi Everyone,
I have an unusual requirement. Here is where i am stuck for sometime now...

I have this text file.. lets say .. output.sql...

it has lot of entries... here below is part of the...
1,437
Posted By vivek d r
Here is the output for the printf and hexdump ...
Here is the output for the printf and hexdump



[root@ ~]# lineno=`grep "/root/.ssh/known_hosts:" /tmp/dateOutputError.txt | awk -F' ' '{print $4}' | cut -d':' -f2`
[root@ ~]# printf "[%s]\n"...
1,437
Posted By vivek d r
Hi Corona, i have posted the contents of lineno...
Hi Corona, i have posted the contents of lineno using echo. it has "1"


Printf output is coming as below


here 1 : lineno: 1
'ed: -e expression #1, char 2: unknown command: `
here 2
'ed:...
1,437
Posted By vivek d r
sed command throwing error while deleting a line from a file
Hi all,


I ahve a program which has to delete a line in a file... if i run the sed command through shell prompt it works fine. But if run it using code its throwing error. May i know where i am...
9,112
Posted By vivek d r
Thanks Jotne and MadeinGermany... :-)
Thanks Jotne and MadeinGermany... :-)
9,112
Posted By vivek d r
okay... but as i said before i dont want to...
okay... but as i said before i dont want to redirect to new file... if i redirect to same file the content will be lost.

i just want a command which after executing it, it should remove the lines...
9,112
Posted By vivek d r
not command output.. its just a file with few...
not command output.. its just a file with few contents where i want to remove the pattern lines from it.
9,112
Posted By vivek d r
After piping , the awk command will just thow...
After piping , the awk command will just thow output on console... it doesnt do any file write operation.
i have a file - fileName after executing the command it should just remove the patterned...
9,112
Posted By vivek d r
Is there any way to use this without any...
Is there any way to use this without any redirection to file.. the above command will just display it.. i want it to be saved in the file.
9,112
Posted By vivek d r
sed command to grep multiple pattern present in single line and delete that line
here is what i want to achieve.. i have a file with below contents


cat fileName
blah blah blah
.
.DROP this
REJECT that
.
--sport 7800 -j REJECT --reject-with icmp-port-unreachable
...
Forum: What is on Your Mind? 05-02-2013
6,879
Posted By vivek d r
Just started playing Tomb Raider 2013, i must say...
Just started playing Tomb Raider 2013, i must say its the best game ever designed. the game is almost 10GB in size and high in terms of graphics with life like display and actions, but still consume...
9,558
Posted By vivek d r
thanks guys.. works good :-)
thanks guys.. works good :-)
9,558
Posted By vivek d r
sed command to replace a line at a specific line number with some other line
my requirement is,

consider a file output


cat output

blah sdjfhjkd jsdfhjksdh
sdfs 23423 sdfsdf sdf"sdfsdf"sdfsdf"""""dsf
hellow there
this doesnt look good
et cetc etc
etcetera...
1,830
Posted By vivek d r
thanks a lot Corona.. quotes solved the issue.....
thanks a lot Corona.. quotes solved the issue.. gosh i have so much to learn,.... :-)
1,830
Posted By vivek d r
Folder contents getting appended as strings while redirecting file contents to a variable
Hi one of the output of the command is as below



# sed -n "/CCM-ResourceHealthCheck:/,/---------/{/CCM-ResourceHealthCheck:/d;/---------/d;p;}" Automation.OutputZ$zoneCounter | sed 's/$/<br>/'...
2,581
Posted By vivek d r
okay got it... issue resolved.. thanks alister.....
okay got it... issue resolved.. thanks alister.. thanks corona.. :-)
2,581
Posted By vivek d r
okay thanks will try to implement it this way.......
okay thanks will try to implement it this way.... so result will act as a pointer is it...

by the way how to set values to the result , i tried setting some parameter to result so that the...
2,581
Posted By vivek d r
alister, i tredi set -x... from the output...
alister, i tredi set -x...

from the output its apparant that

eval jvmCPU2=Not able to fetch HQE value....May be HQE Not runningnow why is it taking only first word and throwing an error from...
2,581
Posted By vivek d r
i tried both EOF and printf.. it dint work..or...
i tried both EOF and printf.. it dint work..or may be i am doing it wrong..

i think i dint explain properly.. here $optUsage$zoneCount is a single variable.... when formed properly it will be...
2,581
Posted By vivek d r
what i am trying to achieve is i want to store...
what i am trying to achieve is i want to store different strings with dynamic variables.. and use this variable and echo them to html file...
zoneCounter can have any number of values starting from...
Showing results 1 to 25 of 281

 

Featured Tech Videos

All times are GMT -4. The time now is 07:35 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy