Hello,
I have been stuck on this aspect of loading a comma delimited file into an array. I thought i had the syntax right, but my commands are not working the way I want them to. Basically my cut command is splitting the file up by spaces and commas. I want the cut command to ignore white spaces.... (2 Replies)
Hi all,
I have a file with single white space delimited values, I want to convert them to a tab delimited file.
I tried sed, tr ... but nothing is working.
Thanks,
Rajeevan D (16 Replies)
i have a file whose data is like this::
osr_pe_assign|-120|wg000d@att.com|4|
osr_evt|-21|wg000d@att.com|4|
pe_avail|-21|wg000d@att.com|4|
osr_svt|-11|wg000d@att.com|4|
pe_mop|-13|wg000d@att.com|4|
instar_ready|-35|wg000d@att.com|4|
nsdnet_ready|-90|wg000d@att.com|4|... (6 Replies)
I am trying to parse a string using delimited char into array.
BNAME=B10,B20,B30
B10.Q=X
B20.Q=Y
B30.Q=Z
I need to parsethe BNAME into array, then i will loop through array to execute command using these variables. like:
for i in $array
do
qload array array.Q # execute command: qload B10... (3 Replies)
Hi All,
I have space delimited file similar to the one as shown below.. I need to convert it as a pipe delimited, the values inside the pipe delimited file should be as highlighted...
AA ATIU2345098809 009697 005374
BB ATIU2345097809 005445 006518
CC ATIU9685098809 003215 003571
DD... (7 Replies)
I have a file which was pipe delimited, I need to make it tab delimited. I tried with sed but no use
cat file | sed 's/|//t/g'
The above command substituted "/t" not tab in the place of pipe.
Sample file:
abc|123|2012-01-30|2012-04-28|xyz
have to convert to:
abc 123... (6 Replies)
Hello folks, I have another doozy. I have two files. The first file has four fields in it. These four fields map to different locations in my second file. What I want to do is read the master file (file 2 - 23 fields) and compare each line against each record in file 1. If I get a match in all four... (4 Replies)
Hi How to make tab delimited file to space delimited?
in put file:
ABC kgy
jkh ghj
ash kjl
o/p file:
ABC kgy
jkh ghj
ash kjl
Use code tags, thanks. (1 Reply)
Hi, I have a rquirement in unix as below .
I have a text file with me seperated by | symbol and i need to generate a excel file through unix commands/script so that each value will go to each column.
ex:
Input Text file:
1|A|apple
2|B|bottle
excel file to be generated as output as... (9 Replies)
Discussion started by: raja kakitapall
9 Replies
LEARN ABOUT DEBIAN
uri::find::delimited
URI::Find::Delimited(3pm) User Contributed Perl Documentation URI::Find::Delimited(3pm)NAME
URI::Find::Delimited - Find URIs which may be wrapped in enclosing delimiters.
DESCRIPTION
Works like URI::Find, but is prepared for URIs in your text to be wrapped in a pair of delimiters and optionally have a title. This will be
useful for processing text that already has some minimal markup in it, like bulletin board posts or wiki text.
SYNOPSIS
my $finder = URI::Find::Delimited->new;
my $text = "This is a [http://the.earth.li/ titled link].";
$finder->find($text);
print $text;
METHODS
new
my $finder = URI::Find::Delimited->new(
callback => &callback,
delimiter_re => [ '[', ']' ],
ignore_quoted => 1 # defaults to 0
);
All arguments are optional; defaults are provided (see below).
Creates a new URI::Find::Delimited object. This object works similarly to a URI::Find object, but as well as just looking for URIs it
is also aware of the concept of a wrapped, titled URI. These look something like
[http://foo.com/ the foo website]
where:
* "[" is the opening delimiter
* "]" is the closing delimiter
* "http://foo.com/" is the URI
* "the foo website" is the title
* the URI and title are separated by spaces and/or tabs
The URI::Find::Delimited object will extract each of these parts separately and pass them to your callback.
callback
"callback" is a function which is called on each URI found. It is passed five arguments: the opening delimiter (if found), the
closing delimiter (if found), the URI, the title (if found), and any whitespace found between the URI and title.
The return value of the callback will replace the original URI in the text.
If you do not supply your own callback, the object will create a default one which will put your URIs in 'a href' tags using the
URI for the target and the title for the link text. If no title is provided for a URI then the URI itself will be used as the
title. If the delimiters aren't balanced (eg if the opening one is present but no closing one is found) then the URI is treated as
not being wrapped.
Note: the default callback will not remove the delimiters from the text. It should be simple enough to write your own callback to
remove them, based on the one in the source, if that's what you want. In fact there's an example in this distribution, in
"t/delimited.t".
delimiter_re
The "delimiter_re" parameter is optional. If you do supply it then it should be a ref to an array containing two regexes. It
defaults to using single square brackets as the delimiters.
Don't use capturing groupings "( )" in your delimiters or things will break. Use non-capturing "(?: )" instead.
ignore_quoted
If the "ignore_quoted" parameter is supplied and set to a true value, then any URIs immediately preceded with a double-quote char-
acter will not be matched, ie your callback will not be executed for them and they'll be treated just as normal text.
This is kinda lame but it's in here because I need to be able to ignore things like
<img src="http://foo.com/bar.gif">
A better implementation may happen at some point.
SEE ALSO
URI::Find.
AUTHOR
Kake Pugh (kake@earth.li).
COPYRIGHT
Copyright (C) 2003 Kake Pugh. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
CREDITS
Tim Bagot helped me stop faffing over the name, by pointing out that RFC 2396 Appendix E uses "delimited". Dave Hinton helped me fix the
regex to make it work for delimited URIs with no title. Nick Cleaton helped me make "ignore_quoted" work. Some of the code was taken from
URI::Find.
perl v5.8.8 2008-03-01 URI::Find::Delimited(3pm)