Sponsored Content
Top Forums Shell Programming and Scripting Script is showing abnormal behavior... Post 302355800 by danmero on Wednesday 23rd of September 2009 08:18:35 PM
Old 09-23-2009
Code:
# cat data.xml
<?xml version="1.0"?>
<xml>
        <Name>ABCDEF</Name>
        <phone>748347</phone>
</xml>

# xml ed -P -u "//phone" -v "554156" data.xml > newdata.xml

# cat newdata.xml
<?xml version="1.0"?>
<xml>
        <Name>ABCDEF</Name>
        <phone>554156</phone>
</xml>

See: XmlStarlet Command Line XML Toolkit User's Guide
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

executing script not showing up in ps -efx

Hi everyone, here's my problem. I have a script that runs in a infinite loop, repeating the same action in another script every 10 minutes. We need to monitor whether or not this loop script is running and be able to kill it should the need arise. However, the name of the script does not show up... (6 Replies)
Discussion started by: herman404
6 Replies

2. UNIX for Dummies Questions & Answers

Odd .sh behavior in script

Hello, I have been working on a what I thought was a fairly simple script for installing a software kit on Linux and Unix I am not new to scripting but am far from being fluent in sh scripting. any assistance would be appreciated. I have an odd bug occuring when executing the script. When... (2 Replies)
Discussion started by: robertmcol
2 Replies

3. UNIX for Dummies Questions & Answers

Weird Behavior of a Script

ok, there's a script i'm working on written in shell programming. #!/bin/sh this script is written to spit out the contents of certain variables inside of it so the output looks something like this: server01=89 server02=69 server03=89 server04=76 now, when i run this script from the... (4 Replies)
Discussion started by: SkySmart
4 Replies

4. Solaris

RC script behavior within Zones

Is there a difference in behavior with start up scripts that are inside of local zones, were trying to write some startup scripts, and it appears things are not running the same, and in some cases, it appears that rc sctripts are not running at all. Anyone else run into this? (1 Reply)
Discussion started by: BG_JrAdmin
1 Replies

5. Shell Programming and Scripting

Behavior of Bad Script in Cron Job

Hi A Ksh script is deployed in a server and executed through cronjob. If one of the line in the middle of the script fails . Are the remaining lines executed ? (3 Replies)
Discussion started by: Sivaswami
3 Replies

6. Shell Programming and Scripting

Showing off my rsync-to-USB script

Thank you all for helping me figure out how to manage spaces in paths. The following script is the result. The script uses rsync to backup files to a USB device. Special thanks to Scrutinizer:b:. rsync2u is a free menu-driven script. Down load the script from... (7 Replies)
Discussion started by: wolfv
7 Replies

7. Shell Programming and Scripting

bash script for showing last users

Hi! I'm new in scripting and I need some help with one simple script. I have to write a program that shows in a predetermined period (using "last" command), to draw up a list of users who have used the machine during this period. Each user to indicate how many sessions it has been during this... (9 Replies)
Discussion started by: vassu
9 Replies

8. Shell Programming and Scripting

shell script behavior is strange or I'm not understanding

Hi I have wrote the small script, where $SRC=$HOME the input file is simple text file having directories in my $SRC on pre line desktop download myfiles games #!/bin/bash FILENAME=$1 ERROR_LOG="$SRC/err.$$.log" while read line do echo "########## strat Gmake $line... (6 Replies)
Discussion started by: the.reverser
6 Replies

9. Shell Programming and Scripting

Script showing incorrect output

Hello scripting geeks, I am new to scripting and facing some issues in writing the logic of the script. Request your kind help here Actually when i run a command i get o/p as below o/p : 0x0000 0x0000 0x0000 0x0000 0x0000 0x0000 these are hex values i guess...now i want to... (15 Replies)
Discussion started by: kulvant29
15 Replies

10. UNIX for Beginners Questions & Answers

Script unusual behavior

Hello, I have noticed some unusual behavior while running the script. when i use below script it gives output 355.23 #!/bin/bash ONEDAY=`date +%Y%m%d --date="1 days ago"` cat /opt/occ/var/performance/counters_`date -d "1 day ago" +%Y%m%d`*|grep "Gy,Gy-Gy-CCR"|awk -F"," '{print... (5 Replies)
Discussion started by: scriptor
5 Replies
Mojo::DOM::HTML(3pm)					User Contributed Perl Documentation				      Mojo::DOM::HTML(3pm)

NAME
Mojo::DOM::HTML - HTML5/XML engine SYNOPSIS
use Mojo::DOM::HTML; # Turn HTML5 into DOM tree my $html = Mojo::DOM::HTML->new; $html->parse('<div><p id="a">A</p><p id="b">B</p></div>'); my $tree = $html->tree; DESCRIPTION
Mojo::DOM::HTML is the HTML5/XML engine used by Mojo::DOM. ATTRIBUTES
Mojo::DOM::HTML implements the following attributes. "charset" my $charset = $html->charset; $html = $html->charset('UTF-8'); Charset used for decoding and encoding HTML5/XML. "tree" my $tree = $html->tree; $html = $html->tree(['root', [qw(text lalala)]]); Document Object Model. "xml" my $xml = $html->xml; $html = $html->xml(1); Disable HTML5 semantics in parser and activate case sensitivity, defaults to auto detection based on processing instructions. METHODS
Mojo::DOM::HTML inherits all methods from Mojo::Base and implements the following new ones. "parse" $html = $html->parse('<foo bar="baz">test</foo>'); Parse HTML5/XML document. "render" my $xml = $html->render; Render DOM to XML. SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>. perl v5.14.2 2012-09-05 Mojo::DOM::HTML(3pm)
All times are GMT -4. The time now is 09:54 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy