08-27-2014
Quote:
Originally Posted by
RudiC
Printed by what?
by "printf" with line by line or other method , but I don't know how to
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
I need to align text from a file that has columns seperated by spaces and commas. Any ideas?
Text is similar to this.
File Name is Test.
05/14/06 13:46:56.575 ,TEST,5,123,1234,123,12345,12,12.2,2.1,4.5,5.23
05/14/06 13:49:58.009 ,TEST,6,456,456.7,45,4.56,453,34,54.3,3.2,6.456 (9 Replies)
Discussion started by: earlepps
9 Replies
2. Solaris
After a memory upgrade all network interfaces are misconfigued. How do i resolve this issue. Below are some out puts.thanks.
ifconfig: plumb: SIOCLIFADDIF: eg000g0:2: no such interface
# ifconfig eg1000g0:2 plumb
ifconfig: plumb: SIOCLIFADDIF: eg1000g0:2: no such interface
# ifconfig... (2 Replies)
Discussion started by: andersonedouard
2 Replies
3. Shell Programming and Scripting
HI ,
I am new to shell scripting i m getting the below format like this
Name FirstName Lastname
------ --------- ----------
Name1 Balaji NandaKishore
Name123 Vijaya krsihna
... (5 Replies)
Discussion started by: Lucky123
5 Replies
4. Shell Programming and Scripting
Hello I am a newbie in scripting and I am hoping someone may help with a method of aligning or tabbing selected text as its output.
For example, using the SED command to extract paragraphs containing AA BBB CCC
sed -e '/./{H;$!d;}' -e 'x;/AAA/!d;/BBB/!d;/CCC/!d'
How could I say, get the... (18 Replies)
Discussion started by: lostincashe
18 Replies
5. Shell Programming and Scripting
Hi,
I need your help to align data from paragraph.
It's to :
- delete the lign contain NDS
- align data between paragraph start to "ND=" from second "ND="
example of file:
@
ABOIL;
@
CEN=1/15-05-23/09 H 06 MN 18/LISTAGE CARACTERISTIQUES D'ABONNES
TRAITEMENT TGLAIL ACC... (1 Reply)
Discussion started by: vremen3
1 Replies
6. Shell Programming and Scripting
Hi,
I have a question on how to align columns in shellscipt.
SAMPLE
2015-07-15 09:01:00.0 |TCSERVER01 |10965
2015-07-15 09:02:00.0 |TCSERVER01 |4752
2015-07-15 09:03:00.0 |TCSERVER01 |4805
2015-07-15 09:04:00.0 |TCSERVER01 |3690
2015-07-15 09:01:00.0 |TCSERVER02 |8703
2015-07-15... (1 Reply)
Discussion started by: reignangel2003
1 Replies
7. Shell Programming and Scripting
Hello again,
I'm having a issue with a contact form. I want the input fields to be aligned on same row and I really dont know how to do it.
I attached a image for you to understand what i am trying to do.
<BR>
<label for="name" class="required">
Name <strong... (1 Reply)
Discussion started by: galford
1 Replies
8. Shell Programming and Scripting
Hi,
Anyone can help on how to re align my data in one row using sed.
test.csv
"url1","abc","project url1"
2016-08-16
"url2,"microsoft","project url2"
2016-08-18
need output like this
"url1","abc","project url1","2016-08-16"
"url2,"microsoft","project url2","2016-08-18"
Thanks in... (8 Replies)
Discussion started by: fspalero
8 Replies
9. Shell Programming and Scripting
I have a text file that I filtered using awk. I only exctracted two columns.
I want those two columns to be aligned. Most of the answers I found was to use `column -t` command. I tried that but I am getting a
`bash: column: command not found`.
Is there another way to align columns... (1 Reply)
Discussion started by: erin00
1 Replies
10. Shell Programming and Scripting
Hello,
I am looking for a method to use in my bash script which allows me to use long strings with all special characters.
I have found that printf method could be helpful for me but unfortunately, when I trying
root@machine:~# tevar=`printf "%s%c"... (2 Replies)
Discussion started by: elxa1
2 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)