hi
i am having four files in a directory.like
1)sampleRej
2)exampleRej
3)samplemain
4)examplemain
my requirement is i have to search for the rejected files (sampleRej,exampleRej) in a directory.if these files in that directory then i have to delete the main files... (3 Replies)
Hi there
I would like to create a shell script to do the following:
- delete a line in file1 if it contains the data string in file2
eg: file1
1 100109942004051510601703694 0.00 0.00
2 100109942004051510601702326 0.00 0.00
3 ... (1 Reply)
I have been working on a script to list all the name's of a subfolder in a text file then edit that text file and then delete the subfolder base on the edited text file so far I have been able to do every thing I just talked about but can't figure out how to delete the subfolers base on a text file... (8 Replies)
Hi,
I need a unix shell script for this requirement and is URGENT
My input text file contains
A-1
B-1
C-1
D-2
E-2
F-3
G-3
H-3
I-3
J-4
K-4
L-5
My expected result should be:
if flag is 1, it has to delete A, B, C
if flag is 2, it has to delete D,E
if flag is 3, it has to delete... (1 Reply)
Hi All,
I am fairly new to the world of Unix, and I am looking for a way to replace a line of text in a file with a delimited array of values.
I have an aliases file that is currently in use on our mail server that we are migrating off of. Until the migration is complete, the server must stay... (8 Replies)
I have a text file with a list of items/patterns:
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig12238
ConsensusfromCGX_alldays_trimmedcollapsedfilteredreadscontiglist(229095contigs)contig34624... (1 Reply)
Hi,
I am trying to extract lines from a text file given a text file containing line numbers to be extracted from the first file. How do I go about doing this? Thanks! (1 Reply)
I have 2 TXT files with with 8 columns in them(tab separated). First file has 2000 entries whereas 2nd file has 300 entries.
The first file has ALL the lines of second file. Now I need to remove those 300 lines (which are in both files) from first file so that first file's line count become... (2 Replies)
Hi Folks,
I am a novice and need to build a script in bash. I have 2 text files data.txt file is big file, column 2 is the we need to search and delete in the output. The filter file contains the rows to be deleted.
Data.txt
state city zone
Alabama Huntsville 4
California SanDiego 3... (3 Replies)
Dear All,
It would be really nice, if you could help me to write a script for deletion of list of user( more than 15000 users) stored in a file and sorted by email address( i need deletion of only a particular type of mail address).
Is the any script to write and take the file as input and... (3 Replies)
Discussion started by: Chand
3 Replies
LEARN ABOUT MOJAVE
uri::queryparam
URI::QueryParam(3) User Contributed Perl Documentation URI::QueryParam(3)NAME
URI::QueryParam - Additional query methods for URIs
SYNOPSIS
use URI;
use URI::QueryParam;
$u = URI->new("", "http");
$u->query_param(foo => 1, 2, 3);
print $u->query; # prints foo=1&foo=2&foo=3
for my $key ($u->query_param) {
print "$key: ", join(", ", $u->query_param($key)), "
";
}
DESCRIPTION
Loading the "URI::QueryParam" module adds some extra methods to URIs that support query methods. These methods provide an alternative
interface to the $u->query_form data.
The query_param_* methods have deliberately been made identical to the interface of the corresponding "CGI.pm" methods.
The following additional methods are made available:
@keys = $u->query_param
@values = $u->query_param( $key )
$first_value = $u->query_param( $key )
$u->query_param( $key, $value,... )
If $u->query_param is called with no arguments, it returns all the distinct parameter keys of the URI. In a scalar context it returns
the number of distinct keys.
When a $key argument is given, the method returns the parameter values with the given key. In a scalar context, only the first
parameter value is returned.
If additional arguments are given, they are used to update successive parameters with the given key. If any of the values provided are
array references, then the array is dereferenced to get the actual values.
$u->query_param_append($key, $value,...)
Adds new parameters with the given key without touching any old parameters with the same key. It can be explained as a more efficient
version of:
$u->query_param($key,
$u->query_param($key),
$value,...);
One difference is that this expression would return the old values of $key, whereas the query_param_append() method does not.
@values = $u->query_param_delete($key)
$first_value = $u->query_param_delete($key)
Deletes all key/value pairs with the given key. The old values are returned. In a scalar context, only the first value is returned.
Using the query_param_delete() method is slightly more efficient than the equivalent:
$u->query_param($key, []);
$hashref = $u->query_form_hash
$u->query_form_hash( \%new_form )
Returns a reference to a hash that represents the query form's key/value pairs. If a key occurs multiple times, then the hash value
becomes an array reference.
Note that sequence information is lost. This means that:
$u->query_form_hash($u->query_form_hash);
is not necessarily a no-op, as it may reorder the key/value pairs. The values returned by the query_param() method should stay the
same though.
SEE ALSO
URI, CGI
COPYRIGHT
Copyright 2002 Gisle Aas.
perl v5.18.2 2012-03-11 URI::QueryParam(3)