09-04-2007
Things in tutorials that don't work.
I am thankful for this site and for the many links provided. I have been going through one of the tutorials, but as I try some things, they don't seem to work.
I am wondering if there is something I need first before being able to use a tutorial (like version number (HP-UX) or how I am getting to it (Exceed))?
Then, are there specific tutorials written for each particular version?
Any help would be greatly appreciated.
9 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
They appear to be turned on, I entered mine in. The check boxes are all checked. And yet, no sigs? (4 Replies)
Discussion started by: l008com
4 Replies
2. Programming
I use FreeBSD,and use signal,like follows:
signal(SIGHUP,sig_hup);
signal(SIGIO,sig_io);
when I run call following code,it can run,but I find a puzzled question,it should print some information,such as printf("execute main()") will print execute main(),but in fact,printf fuction print... (2 Replies)
Discussion started by: konvalo
2 Replies
3. Shell Programming and Scripting
Hi all.
I have a script as below:
cutmth=`TZ=CST+2160 date +%b`
export cutmth
echo $cutmth >> date.log
sed -n "/$cutmth/$p" alert_sbdev1.log > alert_summ.log
My purpose is to run through the alert_sbdev1.log and find the 1st occurence of 'Jan' and send everything after that line to... (4 Replies)
Discussion started by: ahSher
4 Replies
4. Programming
Following code is detecting solaris daytime,when I run it,I can't get any result,code is follows:
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#define BUFFSIZE 150
int main(){
... (2 Replies)
Discussion started by: konvalo
2 Replies
5. Programming
I use Solaris 10, I use following code:
#include <signal.h>
int main(void){
printf("----------testing-----------");
if(signal(SIGUSR1,sig_usr)==SIG_ERR)
err_sys("can't catch SIGUSR1");
for(;;)
pause();
sig_user(int signo){
.....
}
when I run above code,it print nothing... (3 Replies)
Discussion started by: konvalo
3 Replies
6. HP-UX
Hello all!
I have problem in hp-ux 11.11 in awk
I want to grep sar -d 2 1 only 3 column, but have error in awk in hp-ux 11.11
Example:
#echo 123 234 | awk '{print $2}'
123 234
The situattions in commands bdf | awk {print $5}' some...
In hp-ux 11.31 - OK!
How resolve problem (15 Replies)
Discussion started by: ostapv
15 Replies
7. Solaris
Hi,
I installed solaris 10 x86 on my local system. it was working fine. today when i started the system, it started up without any problem. when i tried to open the terminal it didn't open any terminal.
Plz help me (0 Replies)
Discussion started by: malikshahid85
0 Replies
8. Programming
I want copy Files:
But cp don't work:
shell_exec("cp ".$pfad." ".$genzone);
shell_exec("cp ../Chrysanthemum.jpg ../test");
Whats wrong? (3 Replies)
Discussion started by: Linuxmann
3 Replies
9. Shell Programming and Scripting
Hello:
I can't get equivalence classes to work in globs or when passing them to tr. If I understood correctly, matches e, é, è, ê, etc. But when using them with utilities like tr they don't work. Here's an example found in the POSIX standard:
I decided to create the aforementioned files in... (9 Replies)
Discussion started by: Cacializ
9 Replies
LEARN ABOUT DEBIAN
test::xml::xpath
Test::XML::XPath(3pm) User Contributed Perl Documentation Test::XML::XPath(3pm)
NAME
Test::XML::XPath - Test XPath assertions
SYNOPSIS
use Test::XML::XPath tests => 3;
like_xpath( '<foo />', '/foo' ); # PASS
like_xpath( '<foo />', '/bar' ); # FAIL
unlike_xpath( '<foo />', '/bar' ); # PASS
is_xpath( '<foo>bar</foo>', '/foo', 'bar' ); # PASS
is_xpath( '<foo>bar</foo>', '/bar', 'foo' ); # FAIL
# More interesting examples of xpath assertions.
my $xml = '<foo attrib="1"><bish><bosh args="42">pub</bosh></bish></foo>';
# Do testing for attributes.
like_xpath( $xml, '/foo[@attrib="1"]' ); # PASS
# Find an element anywhere in the document.
like_xpath( $xml, '//bosh' ); # PASS
# Both.
like_xpath( $xml, '//bosh[@args="42"]' ); # PASS
DESCRIPTION
This module allows you to assert statements about your XML in the form of XPath statements. You can say that a piece of XML must contain
certain tags, with so-and-so attributes, etc. It will try to use any installed XPath module that it knows about. Currently, this means
XML::LibXML and XML::XPath, in that order.
NB: Normally in XPath processing, the statement occurs from a context node. In the case of like_xpath(), the context node will always be
the root node. In practice, this means that these two statements are identical:
# Absolute path.
like_xpath( '<foo/>', '/foo' );
# Path relative to root.
like_xpath( '<foo/>', 'foo' );
It's probably best to use absolute paths everywhere in order to keep things simple.
NB: Beware of specifying attributes. Because they use an @-sign, perl will complain about trying to interpolate arrays if you don't escape
them or use single quotes.
FUNCTIONS
like_xpath ( XML, XPATH [, NAME ] )
Assert that XML (a string containing XML) matches the statement XPATH. NAME is the name of the test.
Returns true or false depending upon test success.
unlike_xpath ( XML, XPATH [, NAME ] )
This is the reverse of like_xpath(). The test will only pass if XPATH does not generates any matches in XML.
Returns true or false depending upon test success.
is_xpath ( XML, XPATH, EXPECTED [, NAME ] )
Evaluates XPATH against XML, and pass the test if the is EXPECTED. Uses findvalue() internally.
Returns true or false depending upon test success.
set_xpath_processor ( CLASS )
Set the class name of the XPath processor used. It is up to you to ensure that this class is loaded.
In all cases, XML must be well formed, or the test will fail.
SEE ALSO
Test::XML.
XML::XPath, which is the basis for this module.
If you are not conversant with XPath, there are many tutorials available on the web. Google will point you at them. The first one that I
saw was: <http://www.zvon.org/xxl/XPathTutorial/>, which appears to offer interactive XPath as well as the tutorials.
AUTHOR
Dominic Mitchell <cpan2 (at) semantico.com>
COPYRIGHT AND LICENSE
Copyright 2002 by semantico
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2009-07-02 Test::XML::XPath(3pm)