Hello, i added your code into my script, im not sure what file you were referring to so i have attached what i used.
What I wanted was you executing my command on your command prompt (the Linux dollar-prompt).
The file I was refering to was the source file. That is, the one that is being read in your Bash script.
Quote:
Since you are going to test your Bash script, I am sure you know the name of the source file that you'll enter at the prompt above. That file name will be assigned to the variable "infile" in your script.
Now, let's say the source file name you have in mind is "abc.txt".
This file has some XML stuff embedded in it. My hunch is that there are Unicode characters in that XML stuff.
Try this on your Linux dollar-prompt -
Replace the string "abc.txt" by the actual name of your source file name.
i tried that and replaced the file with my source file, in my case it was trace.txt i am not sure where the output file is though? I checked trace.txt and it was the same doc, do i not need to specify where the output is?
sorry if im being slow, i only started learning three weeks ago
i tried that and replaced the file with my source file, in my case it was trace.txt i am not sure where the output file is though? I checked trace.txt and it was the same doc, do i not need to specify where the output is?
...
No, you do not need to specify the output file name. The output will be displayed right after your command.
(A) If you have Ubuntu Gnome, then open up "Gnome Terminal" or "Terminal".
(B) If you have Ubuntu KDE (Kubuntu?), then open up "Konsole".
You'll see a dollar prompt in the terminal window.
Type in the following command at the prompt, in a single line.
Don't type that $ symbol. That's just for you to know that the stuff from "perl -lne .... " has to be typed at the $ prompt.
You could, alternatively, copy+paste the perl command from this webpage.
When you press the Enter or Return key after "trace.txt" the output will be displayed right there on the terminal window - right below your command.
Copy your command and the output from the terminal window and post them over here.
(Put that Bash script aside for the time being. You'd want to investigate the contents of the trace.txt source file first.)
hi,
please help, i have an xml file, e.g:
...
<tag> test text
asdas="${abc}"
xvxvbs:asdas${222}sdad
asasa="${aa_bb_22}"
</tag>
...
i want to extract all "${...}", e.g:
${abc}
${222}
${aa_bb_22}
thank you. (2 Replies)
I'd like to copy strings from a log file and put them into a CSV.
The strings could be on different line numbers, depending on size of log.
Example Log File:
File = foo.bat
Date = 11/11/11
User = Foo Bar
Size = 1024
...
CSV should look like:
"foo.bat","11/11/11","Foo Bar","1024" (7 Replies)
Dear all
I have a log file and the content like this
file name: temp.log
<?xml version="1.0" encoding="cp850"?>
<!DOCTYPE aaabbb SYSTEM '/dtdpath'>
<aaabbb>
<tranDtl>
<msgId>000001</msgId>
</tranDtl>
.....
</aaabbb>
...
... (1 Reply)
I have an xml file that generally looks like this:
"<row><dnorpattern>02788920</dnorpattern><description/></row><row><dnorpattern>\+
44146322XXXX</dnorpattern><description/></row><row><dnorpattern>40XXX</dnorpattern><description/></row><row><dnorpattern>11</dn... (4 Replies)
I have some xml files that cannot be read using a standard parser, or I am using the wrong parser. The issues seems to be spaces in some of the tags.
Here is a sample,<UgUn 2 >
<Un>
-0.426753
</Un>
</UgUn>The parser isn't able to find the number 2, so that information is lost, etc. It seems... (16 Replies)
Hello People,
I have the following contents in an XML file
...........
...........
..........
...........
<Details = "Sample Details">
<Name>Bob</Name>
<Age>34</Age>
<Address>CA</Address>
<ContactNumber>1234</ContactNumber>
</Details>
...........
.............
.............. (4 Replies)
I have the following string:
<min-pool-size>2</min-pool-size>
When I pipe the string into the following code I am expcting for it to return just the value "2", but its just reurning the whole string. Why??
sed -n '/<min-pool-size>/,/<\/min-pool-size>/p'
Outputting:... (13 Replies)
This is the line that I am using:
sed 's/^*\({3}*$\)/\1 /' <test.txt >results.txt
and suppose that test.txt contains the following lines:
http://www.example.com/200904/AUS.txt
http://www.example.com/200903/_RUS.txt
http://www.example.com/200902/.FRA.txt
What I expected to see in results.txt... (6 Replies)
Hi, I want to get data from Xml file by using sed or awk command. I want to get the following result :
mon titre 1;Createur1;Dossier1
mon titre 1;Createur1;Dossier1
and save it in cvs file (fichier.cvs).
FROM this Xml file (test.xml):
<playlist version="1">
<trackList>
<track>... (1 Reply)