10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have test.xml XML file like
<Report account="123456" start_time="2014-09-08T00:00:00+00:00" end_time="2014-09-10T23:59:59+00:00" user="Dollar Tree" limit="1000000" more_sessions="some text ">
<Session ......rest of xml...............
I need output like
<Report>
<Session ......rest of... (3 Replies)
Discussion started by: kumars1331@gmai
3 Replies
2. Shell Programming and Scripting
Hi Folks,
Could you please advise what will be the SED command to replace a word in all xml's under a particular directory
for example let say I rite now at the following below location
$ cd /ter/rap/config
now under config directory there will be lots of xml file , now my objective is to... (1 Reply)
Discussion started by: punpun66
1 Replies
3. Shell Programming and Scripting
I have the following string :
Cat dog fox catepillar bear foxy
I need to replace "cat" and "fox" words from this sentence to word "animal"
I do the following:
$Str1="cat";
$Str2="fox";
$NewStr="animal";
open(F1, "<$inputFile") or die "Error: $!";
open(F2, ">$outputFile") or... (1 Reply)
Discussion started by: AIX_30
1 Replies
4. Shell Programming and Scripting
Hi,
i have a file with lines,
file.txt
-------
test is fun
testing is better
I need to replace 'test' to 'develop' and i used,
a=test
b=develop
sed "s,$a,$b,g" -------- but i see the word 'testing' is also replaced. Need some solution. Is there any way i could replace only 'test' ? (4 Replies)
Discussion started by: giri_luck
4 Replies
5. Shell Programming and Scripting
Hi
I have a log file which has outputs like the one below
conn=24,196 op=1 RESULT err=0 tag=0 nentries=9 etime=3,712 dbtime=0 mem=486,183,328/2,147,483,648
Now most of the time I am only interested in the time ( the first column) and a column that begins with etime i.e... (8 Replies)
Discussion started by: pkabali
8 Replies
6. Shell Programming and Scripting
Hello, this is probably a simple request but I've been toying with it for a while.
I have a large list of devices and commands that were run with a script, now I have lines such as:
a-router-hostname-C#show ver
I want to print everything up to (and excluding) the # and everything after it... (3 Replies)
Discussion started by: ippy98
3 Replies
7. Shell Programming and Scripting
source "PUT 810 712 0001 ILC AK4 00 0 00 00"
It needs to be changed to "PUT,810,712,0001,ILC,AK4 00 0 00 00"
Thanks in advance. (6 Replies)
Discussion started by: janex
6 Replies
8. Shell Programming and Scripting
I am trying to replace the line which has string "tablespace" not case senstive....
with below simple script: mysrcipt.sh
sed "s/.*/TABLESPACE USERS/g" create_table > tmp
mv tmp create_table
Is there any better way to do it? If Search string tooooooo long it will be tough to code in... (4 Replies)
Discussion started by: ganeshd
4 Replies
9. Shell Programming and Scripting
This seems like it should be an easy problem, but I'm a noob and I can't figure it out. I'm trying to use sed, but would be happy to use anything that does the job.
I am trying to trim off a fixed number of unknown characters from 2 different : delimited fields while keeping the intervening... (4 Replies)
Discussion started by: helix_w
4 Replies
10. UNIX for Dummies Questions & Answers
Hi
I have the following file that i need to run a sed command on
1<tab>running
2<tab>running
3<tab>running
4<tab>running
I want to be able to replace a line i.e the second one with '2<tab>failed'. As the first number is unique that can be used to search for the relevant line (using ^2 i... (5 Replies)
Discussion started by: handak9
5 Replies