I am looking to parse a text file output and set variables based on what is cropped from the parsing.
Below is my script I am looking to add this feature too.
All it does is scan a certain area of users directories for anyone using up more than X amount of disk space. It then writes to the output file and emails the output file when done to a number of people that is defined in the script.
I am using xmllint to parse xml file which has several tags and each tag has several attributes. Sample structure as shown below:
<root>
<child attr1="abc" attr2="def" attr3="ghi" />
...
...
</root>
I need to fetch the values from the attributes attr1,attr2 and attr3.
In the wake of the post: how-parse-following-xml-file
Thank you for the very useful chakrapani response 302355585-post4 !
A close question.
How to pass a file to xmllint in variable?
For example, let it be:
Code:
NEARLY_FILE='<?xml version="1.0" encoding="iso-8859-1"?><html><set label="09/07/29" value="1241.90"/></html>'
Then I
Dear All,
this is my first post on this Forum, glad to be here.
I'm trying to fix an .ods file.
I have created a Shell Script as below
Sample.sh
echo "Hi there"
I also added cron job in cron tab which is under /etc/crontab as below
* * * * * /home/Sample.sh > /home/Sample.txt
I have created the Sample.txt file in /home/ directory.
I have also checked the permission for read and write for both the file
When I execute the Sample.sh file it works fine.it writes in Sample.txt file
Hi,
Here is a sample xml file and expected output.
I need to extract the element/tag name (not value) and xpath (sample output.txt).
I am trying to parse a text file that is generated by an expec script that
pulls down some information from a switch.
Here is a sample output:
192 0000.0000.0000 1/g23 Dynamic
192 0000.0000.0000 ch1 Dynamic
192 0000.0000.0000 ch1 Dynamic
192 0000.0000.0000 ch1 Dynamic
The text fi
My end goal is to read some weather information from a text or xml file, extract the temperature and write it on an image file using convert. I am trying to take it one step at a time learn a little and improve on my bash scrip.
I get daily a text file with ip:port, one per line, example:
11.22.33.44:80
22.33.44.55:8080
33.44.55.66:7777
I would like to parse the first ip and port in two different variables, then write them into another file, wait exceution of a program that use these variables, loop this cycle to pass all the ip:port to the file and execute program.
How can I do that?
thank you