06-24-2019
This User Gave Thanks to Scrutinizer For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
when I do
$ ls z*
List of all files begining with 'z'. But what if I want to do a reverse lookup. Just for interest sake ;)
$ ls ztr
should be same as
$ ls ztr*
$ ls zt*
$ ls z* (2 Replies)
Discussion started by: azmathshaikh
2 Replies
2. Shell Programming and Scripting
Hello,
How do i sort a csv file. i should be sorting column1(varchar),column2*(varchar) in ascending and column4 in descending order(numeric datatype).
I tried few combinations of sort, but doesn't seem to be getting the right result.
sort -t "," -k 1 -k 2 -k 4nr file
any help is... (3 Replies)
Discussion started by: markjason
3 Replies
3. Shell Programming and Scripting
hi,
I have to reverse the command output like below:
output:
online
offline
disable
maintening
killed
How to reverse this output like:
killed
maintening
disable
offline
online
It should be ksh script. (4 Replies)
Discussion started by: a2156z
4 Replies
4. Shell Programming and Scripting
Just check out the script...
1 #!/bin/bash
2
3 echo -n "Enter a string :: "
4 read str
5 echo -n "Reverse is :: "
6 l=`expr length "$str"`
7 while
8 do
9 m=`echo $str | cut -c "$l"`
10 echo -n $m
11 ... (3 Replies)
Discussion started by: lipun4u
3 Replies
5. Shell Programming and Scripting
Hello,
I got a Qstion. Im posting to a phpbb forum with bash and curl.. i have a text file with the following tags that i post to the forum:
$var1
$var2
$var3
How can i with sed or awk put var content from shell script between the ... in the... (7 Replies)
Discussion started by: atmosroll
7 Replies
6. Shell Programming and Scripting
Input
data_10 SSA
data_2 TYUE
data_3 PEOCV
data_6 SSAT
data_21 SSA
data_19 TYUEC
data_14 TYUE
data_15 SSA
data_32 PEOCV
.
.
Desired Output
data_10 SSA
data_2 TYUE
data_3 PEOCV
data_6 SSAT
data_19 TYUEC (9 Replies)
Discussion started by: patrick87
9 Replies
7. Shell Programming and Scripting
Hello guys
How can I use egrep to match word1 but not word2...word1.
What I mean
suppose that I have the following text, and my word1=pizza and word2=eat
I hate to eat pizza because I ma eating it each day
Pizza is good
I like vegetarian and Italian Pizza
eating healthy food is... (7 Replies)
Discussion started by: fdc2suxs
7 Replies
8. Shell Programming and Scripting
Hi,
I am having a file with some data present in blocks
e.g.
----------------
some data
some more data
couple of more lines.
----------------
another set of data
more lines
----------------
even more data
more lines
----------------what I need is reverse the data.
like..
... (4 Replies)
Discussion started by: shellwell
4 Replies
9. Shell Programming and Scripting
I am in the process of developing a perl cgi page.
I had succeeded in developing the page but there are few errors/issues with the page.
description about cgi page:
My CGI page retrieves all the file names from an directory and displays the files in drop down menu for downloading the... (5 Replies)
Discussion started by: scriptscript
5 Replies
10. Shell Programming and Scripting
I'm trying to reverse every even line in my file using the awk command below but it prints only the odd lines but nothing else:
$ awk '(NR % 2) {print}; !(NR % 2) {print | "rev";}' myfile
Any idea what I might have done wrong?
Thank you. (10 Replies)
Discussion started by: ivpz
10 Replies
LEARN ABOUT DEBIAN
xml::easy::content
XML::Easy::Content(3pm) User Contributed Perl Documentation XML::Easy::Content(3pm)
NAME
XML::Easy::Content - abstract form of XML content
SYNOPSIS
use XML::Easy::Content;
$content = XML::Easy::Content->new([
"foo",
$subelement,
"bar",
]);
$twine = $content->twine;
DESCRIPTION
An object of this class represents a chunk of XML content, the kind of matter that can be contained within an XML element. This is in an
abstract form, intended for general manipulation. It is completely isolated from the textual representation of XML, and holds only the
meaningful content of the chunk. The data in a content object cannot be modified: different data requires the creation of a new object.
An XML content chunk consists of a sequence of zero or more characters and XML elements, interspersed in any fashion. Character content
can use almost all Unicode characters, with only a few characters (such as most of the ASCII control characters) prohibited by the
specification from being directly represented in XML. Each XML element in a content chunk itself recursively contains a chunk of content,
in addition to having attached metadata.
This class is not meant to be subclassed. XML content is unextendable, dumb data. Content objects are better processed using the
functions in XML::Easy::NodeBasics than using the methods of this class.
CONSTRUCTOR
XML::Easy::Content->new(TWINE)
Constructs and returns a new content chunk object with the specified content. TWINE must be a reference to an array listing the
chunk's content in twine form (see "Twine" in XML::Easy::NodeBasics). The content is checked for validity, against the XML 1.0
specification, and the function "die"s if it is invalid.
METHODS
$content->twine
Returns a reference to an array listing the chunk's content in twine form (see "Twine" in XML::Easy::NodeBasics).
The returned array must not be subsequently modified. If possible, it will be marked as read-only in order to prevent modification.
$content->content
Deprecated alias for the "twine" method.
SEE ALSO
XML::Easy::Element, XML::Easy::NodeBasics
AUTHOR
Andrew Main (Zefram) <zefram@fysh.org>
COPYRIGHT
Copyright (C) 2008, 2009 PhotoBox Ltd
Copyright (C) 2009, 2010, 2011 Andrew Main (Zefram) <zefram@fysh.org>
LICENSE
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2011-11-16 XML::Easy::Content(3pm)