I have a file whose content I need to read and get the 3rd line .. ex:
What I need is to read a content of third line of this file and print first three characters ... I could print first three characters with "head -c 3" if I could get the content of the third line ... that is what I struggle with.. please help
Hi All,
I need to read line by line from a file(created using vi editor) till end of the file and pass it to my own executables so that it will read first line and execute and then other and so on...Thanks
The steps are like this;
1) read first line in file
2) execute the job with first line as... (2 Replies)
Hi,
Is it possible to read every 2 lines as single record, I have a file like below,
~CZK ~TSCHECHISCHE KRONE ~TSCHECH. REPUBLIK
Dec 1 2005 12:00AM~ 10.840000~
~DKK ~DAENISCHE KRONE ~DAENEMARK
Dec 2 2005 12:00AM~ ... (9 Replies)
How can I exclude reading lines in a file that contains the following:
filesystem:/home/pach/liv_patches 128005120 88456640 37270758 71% /home/patches
That is, all lines that contain and begins with filesystem: should not be processed/read from a file (5 Replies)
I want a script that while it read the lines in the file below,it will check if the second variable is greater or equal 10.if less delete the line
tom|2
john|5
simms|23
reed|30
paul|11
After running scripts i should get
simms|23
reed|30
paul|11 (5 Replies)
Hi Experts,
I am tryin to read a file and while doing so i need to skip the lines which start with a hash (#) char.
I thought of using a goto command but a lot of guys on this site say its not the good way to program. Moreover I am using a ksh shell which deos not support goto command.
... (4 Replies)
Hi all,
I jut use a loop to read lines from the user and redirect it to a file.
echo "Enter the line"
while read -r LINE
do
echo $LINE >> FILE
if ;then
break
fi
done
input
app... (1 Reply)
Dear all,
I have a file like this:
imput
scaffold_0 1
scaffold_0 10000
scaffold_0 20000
scaffold_0 25000
scaffold_1 1
scaffold_1 10000
scaffold_1 20000
scaffold_1 23283
and I want the output like this:
scaffold_0 1 scaffold_0 10000
scaffold_0 10000 scaffold_0 20000... (6 Replies)
Hello everyone,
I have thought about this for quite some time and know what I want to do but am having some trouble at it. I have a text file filled with numbers like this, there are more in the file obviously. Each number is separated by a space.
1 3 2 4 5
1 -1 1 0 -1 5The idea is... (7 Replies)
Hi,
I have been trying to do a little script in Csh, to classify some information of a text document.
My problem appears when i have to calssificate two parts of the same line into different variables, for example in the document appears something like that:
ID NAME
999999,Michel... (1 Reply)
Hi guys,
I need to read following lines and put them in same row ….
text: Abcd5437_XYA0_B1_WXYZ_BE
99:00:14:42:55:01:d4:22
99:00:14:42:70:01:d4:22
99:00:14:42:55:03:a0:22
99:00:14:42:70:03:a0:22
... (4 Replies)
Discussion started by: dc@bos
4 Replies
LEARN ABOUT CENTOS
xml::parser::style::tree
Parser::Style::Tree(3) User Contributed Perl Documentation Parser::Style::Tree(3)NAME
XML::Parser::Style::Tree
SYNOPSIS
use XML::Parser;
my $p = XML::Parser->new(Style => 'Tree');
my $tree = $p->parsefile('foo.xml');
DESCRIPTION
This module implements XML::Parser's Tree style parser.
When parsing a document, "parse()" will return a parse tree for the document. Each node in the tree takes the form of a tag, content pair.
Text nodes are represented with a pseudo-tag of "0" and the string that is their content. For elements, the content is an array reference.
The first item in the array is a (possibly empty) hash reference containing attributes. The remainder of the array is a sequence of tag-
content pairs representing the content of the element.
So for example the result of parsing:
<foo><head id="a">Hello <em>there</em></head><bar>Howdy<ref/></bar>do</foo>
would be:
Tag Content
==================================================================
[foo, [{}, head, [{id => "a"}, 0, "Hello ", em, [{}, 0, "there"]],
bar, [ {}, 0, "Howdy", ref, [{}]],
0, "do"
]
]
The root document "foo", has 3 children: a "head" element, a "bar" element and the text "do". After the empty attribute hash, these are
represented in it's contents by 3 tag-content pairs.
perl v5.16.3 2011-05-25 Parser::Style::Tree(3)