see this
cat < Files
return the cointent of Files
but
cat files
return the same result
WHI???
this command
lp -f """PRINTER" < cat files
not print the content of files (1 Reply)
Dear friends,
please tell me how to find the files which are existing in the current directory, but it sholud not search in the sub directories..
it is like this,
current directory contains
file1, file2, file3, dir1, dir2
and dir1 conatins
file4, file5
and dir2 contains
file6,... (9 Replies)
I intend to find the path/full location of a file(filename given by user thru "read filenme") using "find" or any other command and then store it's output in a variable for some other processing.
But struggling to put all things together (i.e finding the fully qualified location of that file and... (4 Replies)
Hi,
I have line in input file as below:
3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL
My expected output for line in the file must be :
"1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL"
Can someone... (7 Replies)
I want to list all files/lines which except those which contain the pattern ' /proc/' OR ' /sys/' (mind the leading blank).
In a first approach I coded:
find / -exec ls -ld {} | grep -v ' /proc/| /sys/' \; > /tmp/list.txt
But this doesn't work. I got an error (under Ubuntu):
grep:... (5 Replies)
Hi All,
I am new here but I have a scripting question that I can't seem to figure out with the "find" cmd.
What I am trying to do is to only have to run a single find cmd parsing the directories and output the different file types to induvidual files and I have been running into problems.... (3 Replies)
Which one of the following are more accurate and why?
nohup myScript.sh 1>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &
nohup myScript.sh 1>>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &
nohup myScript.sh >nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &
nohup myScript.sh >>nohup_$(date +%Y%m%d%H%M%S).out 2>&1 &... (3 Replies)
How to use "mailx" command to do e-mail reading the input file containing email address, where column 1 has name and column 2 containing “To” e-mail address
and column 3 contains “cc” e-mail address to include with same email.
Sample input file, email.txt
Below is an sample code where... (2 Replies)
Hi,
I have to redirect output of the command "perldoc perllocal" to new file which
contains all the perl module installed.
Currently using
perldoc perllocal >> mod_data
This does not contain all perl modules installed locally on machine, and each character is doubled.
Please... (3 Replies)
Discussion started by: asak
3 Replies
LEARN ABOUT DEBIAN
graph::unionfind
Graph::UnionFind(3pm) User Contributed Perl Documentation Graph::UnionFind(3pm)NAME
Graph::UnionFind - union-find data structures
SYNOPSIS
use Graph::UnionFind;
my $uf = Graph::UnionFind->new;
# Add the vertices to the data structure.
$uf->add($u);
$uf->add($v);
# Join the partitions of the vertices.
$uf->union( $u, $v );
# Find the partitions the vertices belong to
# in the union-find data structure. If they
# are equal, they are in the same partition.
# If the vertex has not been seen,
# undef is returned.
my $pu = $uf->find( $u );
my $pv = $uf->find( $v );
$uf->same($u, $v) # Equal to $pu eq $pv.
# Has the union-find seen this vertex?
$uf->has( $v )
DESCRIPTION
Union-find is a special data structure that can be used to track the partitioning of a set into subsets (a problem known also as disjoint
sets).
Graph::UnionFind() is used for Graph::connected_components(), Graph::connected_component(), and Graph::same_connected_components() if you
specify a true "union_find" parameter when you create an undirected graph.
Note that union-find is one way: you cannot (easily) 'ununion' vertices once you have 'unioned' them. This means that if you delete edges
from a "union_find" graph, you will get wrong results from the Graph::connected_components(), Graph::connected_component(), and
Graph::same_connected_components().
API
add
$uf->add($v)
Add the vertex v to the union-find.
union
$uf->union($u, $v)
Add the edge u-v to the union-find. Also implicitly adds the vertices.
has
$uf->has($v)
Return true if the vertex v has been added to the union-find, false otherwise.
find
$uf->find($v)
Return the union-find partition the vertex v belongs to, or "undef" if it has not been added.
new
$uf = Graph::UnionFind->new()
The constructor.
same
$uf->same($u, $v)
Return true of the vertices belong to the same union-find partition the vertex v belongs to, false otherwise.
AUTHOR AND COPYRIGHT
Jarkko Hietaniemi jhi@iki.fi
LICENSE
This module is licensed under the same terms as Perl itself.
perl v5.10.0 2008-11-27 Graph::UnionFind(3pm)