Hi Guys,
I need to set the value of $7 to zero in case $7 is NULL. I've tried the below command but doesn't work. Any ideas. thanks guys.
MEM=`ps v $PPID| grep -i db2 | grep -v grep| awk '{ if ( $7 ~ " " ) { print 0 } else { print $7}}' `
Harby. (4 Replies)
Hello,
I'm working on unix with grep (GNU grep) 2.5.1. I'm going through some of the newer regex syntax using Regular Expression Reference - Advanced Syntax a guide.
ls -aLl /bin | grep "\(x\)"
Which works, just highlights 'x' where ever, when ever.
I'm trying to to get (?:) to work but... (4 Replies)
Hello.
I want to get all modules which are loaded and which name are exactly 2 characters long and not more than 2 characters and begin with "nv"
lsmod | (e)grep '^nv????????????
I want to get all modules which are loaded and which name begin with "nv" and are 2 to 7 characters long
... (1 Reply)
We are getting the error below in Linux - Oracle 11g Bench as below:
Last System configure:
NOTE: Fri May 18 17:34:32 IST 2012: creating SPFILE ...
CREATE SPFILE='<path>/ORACLE/admin/eml100_1/pfile/spfile.ora.UPD' FROM PFILE='<path>/ORACLE/admin/eml100_1/pfile/config.ora'
*
ERROR at line... (2 Replies)
i have this line of code that looks for the same file if it is currently running and returns the count.
`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh | grep -v grep | wc -l`
basically it is assigned to a variable
ISRUNNING=`ps -eaf -o args | grep -i sfs_pcard_load_file.ksh |... (6 Replies)
Discussion started by: wtolentino
6 Replies
LEARN ABOUT DEBIAN
xml::normalize::libxml
XML::Normalize::LibXML(3pm) User Contributed Perl Documentation XML::Normalize::LibXML(3pm)NAME
XML::Normalize::LibXML - simple whitespace striping functions
SYNOPSIS
use XML::Normalize::LibXML qw(trim xml_normalize xml_strip_whitespace);
$greeting=trim(" hallo world "); # returns "hallo world" xml_normalize($dom->getDocumentElement());
xml_strip_whitespace($dom->getDocumentElement());
DESCRIPTION
This module provides simple whitespace striping and text-node normalizing functions.
"trim($string)"
Returns the string with any whitespace occuring at its beginning or end removed.
"xml_normalize($dom)"
Puts all Text nodes in the full depth of the sub-tree underneath this Element into a normal form where only markup (e.g., tags, comments,
processing instructions, CDATA sections, and entity references) separates Text nodes, i.e., there are no adjacent Text nodes. This can be
used to ensure that the DOM view of a document is the same as if it were saved and re-loaded, and is useful when operations (such as
XPointer lookups) that depend on a particular document tree structure are to be used.
"xml_strip_whitespace($dom [,$include_attributes])"
Normalizes the subtree and trims whitespace from all Text nodes within the subtree. If the optional argument $include_attributes is defined
and non-zero, this function trims whitespace also from all Attribute nodes.
"xml_strip_element($node)"
Removes leading and trailing whitespace from a given element.
AUTHOR
Petr Pajas, pajas@matfyz.cz
COPYRIGHT
Copyright 2002-2003 Petr Pajas, All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
XML::LibXML
perl v5.10.1 2003-12-03 XML::Normalize::LibXML(3pm)