09-14-2011
Superb!!
Thank you all,
All suggestion is working
, now I got prob, to select which method is the easiest
.
Thanks again
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I found below script to check whether the variable is a digit in ksh.
############################
#!/bin/ksh
REPLY="3f"
if ]*\)'` != ${REPLY} && "${REPLY}" != "0" ]]
then
print "is digit\n"
else
print "not digit\n"
fi
############################
Although it works fine, but... (6 Replies)
Discussion started by: sleepy_11
6 Replies
2. Shell Programming and Scripting
Folks,
Is there a simple way to replace one digit by two digit using sed.
Example,
mydigit1918_2006_8_8_lag1.csv should be
mydigit1918_2006_08_08_lag01.csv.
I tried this way, but doesn't work.
echo mydigit1989_2006_8_8_lag1.csv|sed 's/]/0]/'
Thank you, (5 Replies)
Discussion started by: Jae
5 Replies
3. Shell Programming and Scripting
Hi All,
How can i convert a number 24 to 0024
In the same way how can i convert 123 to 0123?
All this has to be done inside a script
Thanks in advance
JS (6 Replies)
Discussion started by: jisha
6 Replies
4. Shell Programming and Scripting
I have a var storing date
var=`date`
Now the date is returned as
Mon Feb 2 00:25:48 PST 2009
Is there any way to check the date field alone ("2" in above case) and if its a single digit then add a prefix 0 to it and store the result in same variable "var"
My intention in above case is... (3 Replies)
Discussion started by: villain41
3 Replies
5. Shell Programming and Scripting
I have string like
abcdefgh
i want to delete first two digit of the string. output should be
cdefgh
plz give me solution (3 Replies)
Discussion started by: Gopal_Engg
3 Replies
6. Shell Programming and Scripting
Hi User,
I have a text file with a lot of customer records (over 10,000). Each record contained one field called "charge" and it must start with some space (each record may have 15 space, 17 spece, 9 space,etc, then start with <charge> and end with </charge>, in between is a value.
How can I... (3 Replies)
Discussion started by: happyv
3 Replies
7. Programming
Hi,
Does anybody know what the below means:
I have a program containing the following and am trying to understand what it does:
temp=$(echo $count2 | tr -cd )
Cheers
Paul
Please start using code tags (2 Replies)
Discussion started by: runnerpaul
2 Replies
8. Shell Programming and Scripting
Have columns with digits and strings like:
input.txt
3840 3841 3842 Dav Thun Tax
Cahn 146; Dav.
3855 3853 3861 3862 Dav Thun Tax
2780 Karl VI.,
3873 3872 3872 Dav Thun Tax
3894 3893 3897 3899 Dav Thun Tax
403; Thun 282.
3958 3959 3960 Dav Thun Tax
3972 3972 3972 3975 Dav Thun Tax... (8 Replies)
Discussion started by: sdf
8 Replies
9. Shell Programming and Scripting
Hi Guys.
My Input:
ABCD 12 00 KL
ABCD 12 08 DL
ABCD 12 10 KK
ABCD 12 04 LL
ABCD 13 00 LP
ABCD 13 1O LS
Output:
ABCD 12 0 KL
ABCD 12 8 DL
ABCD 12 10 KK
ABCD 12 4 LL
ABCD 13 0 LP (2 Replies)
Discussion started by: pareshkp
2 Replies
10. Shell Programming and Scripting
Thanks of your suggestions i was able to calculate the delta between some numbers in a column file with .
awk 'BEGIN{last=0}{delta=$1-last; last=$1; print $0" "delta}'
the file was like
499849120.00
500201312.00
500352416.00
500402784.00
500150944.00
499849120.00
500150944.00... (3 Replies)
Discussion started by: Board27
3 Replies
LEARN ABOUT OSX
tap::parser::iterator
TAP::Parser::Iterator(3pm) Perl Programmers Reference Guide TAP::Parser::Iterator(3pm)
NAME
TAP::Parser::Iterator - Base class for TAP source iterators
VERSION
Version 3.23
SYNOPSIS
# to subclass:
use vars qw(@ISA);
use TAP::Parser::Iterator ();
@ISA = qw(TAP::Parser::Iterator);
sub _initialize {
# see TAP::Object...
}
sub next_raw { ... }
sub wait { ... }
sub exit { ... }
DESCRIPTION
This is a simple iterator base class that defines TAP::Parser's iterator API. Iterators are typically created from
TAP::Parser::SourceHandlers.
METHODS
Class Methods
"new"
Create an iterator. Provided by TAP::Object.
Instance Methods
"next"
while ( my $item = $iter->next ) { ... }
Iterate through it, of course.
"next_raw"
Note: this method is abstract and should be overridden.
while ( my $item = $iter->next_raw ) { ... }
Iterate raw input without applying any fixes for quirky input syntax.
"handle_unicode"
If necessary switch the input stream to handle unicode. This only has any effect for I/O handle based streams.
The default implementation does nothing.
"get_select_handles"
Return a list of filehandles that may be used upstream in a select() call to signal that this Iterator is ready. Iterators that are not
handle-based should return an empty list.
The default implementation does nothing.
"wait"
Note: this method is abstract and should be overridden.
my $wait_status = $iter->wait;
Return the "wait" status for this iterator.
"exit"
Note: this method is abstract and should be overridden.
my $wait_status = $iter->exit;
Return the "exit" status for this iterator.
SUBCLASSING
Please see "SUBCLASSING" in TAP::Parser for a subclassing overview.
You must override the abstract methods as noted above.
Example
TAP::Parser::Iterator::Array is probably the easiest example to follow. There's not much point repeating it here.
SEE ALSO
TAP::Object, TAP::Parser, TAP::Parser::Iterator::Array, TAP::Parser::Iterator::Stream, TAP::Parser::Iterator::Process,
perl v5.16.2 2012-10-25 TAP::Parser::Iterator(3pm)