10-22-2002
Quote:
Originally posted by ganti
grep "string" `find / -type f`
GOOD LUCK
"GOOD LUCK" is right!
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
I have a script that when run creates 4 other text files. Sometimes a couple of these text files are empty. So what I am trying to do is find out if there is text in the file and if not delete the file.
What I have so far is the following script. I am just not sure how to return a true value... (9 Replies)
Discussion started by: iCONAN
9 Replies
2. UNIX for Dummies Questions & Answers
How do i find text string in a file if i have no idea where the file is?
What I am trying to do is find an email address in a file and have no idea where the file is.
Thanks (5 Replies)
Discussion started by: §ynic
5 Replies
3. Shell Programming and Scripting
Hello,
Please help me with this.
I have two files. file1.txt and file2.txt
File1 contains text as below
txt1 txt2
txt3 txt4
txt5 txt6
txt7 txt8
File2 contains text as below
$1 $2 $3 $4 $5 $6 $7 $8 $9
-----------------------------
txt1 txt2 - - - 0 2 8 -*-
txt0 txt7 - - - 1 4 8... (3 Replies)
Discussion started by: tenderfoot
3 Replies
4. Shell Programming and Scripting
Hi All,
I need a small help in formating a file.
I have a file with word like this;
ATGHYJIKOLFHJDHDGDYFGFYGRYGFYRHFYHFUED
DHDJFDFSJFLFJSKJFSLKJFGHDKLGLDKGLKDNVNV
VNLDVLDVDHFJDKDJVNVHSUFNHJFMVJFMVKJMFV
...
....
....like this 75000 words.
I want to convert this words into a single... (5 Replies)
Discussion started by: Lucky Ali
5 Replies
5. Shell Programming and Scripting
Hi,
I need to find out the last column value from a text file which is delimited by a tab.
The issue here is the last column# for each record can be different i.,e, 1st record can have the last column as 15 and the second record can have the last column as "17".
I have to search a string... (3 Replies)
Discussion started by: naveen_sangam
3 Replies
6. Shell Programming and Scripting
Can any one tell me how to get the second last column value from the text file, which has different record size for each record.
I know how to get the last column using awk and print statements, but I am unable to get the second last column value from the file. (4 Replies)
Discussion started by: naveen_sangam
4 Replies
7. Homework & Coursework Questions
Hi
Guys , I am new to this and Hi to all ,Need your help
I am trying to copy Files which are inside file.txt
The files inside file.txt are inthe below order
file1.log
file2.log
file3.log
.......
I want to copy these files to an output Directory ,
Please help (1 Reply)
Discussion started by: hc17972
1 Replies
8. Homework & Coursework Questions
Hi
Guys , I am new to this and Hi to all ,Need your help
I am trying to copy Files which are inside file.txt
The files inside file.txt are inthe below order
file1.log
file2.log
file3.log
.......
I want to copy these files to an output Directory ,
Please help (1 Reply)
Discussion started by: hc17972
1 Replies
9. UNIX for Dummies Questions & Answers
Hi,
I have a very large file that contains a listing of all files on the system. I need to create a listing from that file of all files that start with the following format: s???_*, whereas the '?' represents characters, so the file name begins with an 's' followed by three other characters and... (4 Replies)
Discussion started by: tes218
4 Replies
10. Shell Programming and Scripting
i have little challenge, help me out.i have a file where i have a value declared and and i have to replace the value when called. for example i have the value for abc and ccc. now i have to substitute the value of
value abc and ccc in the place of them.
Input File:
go to &abc=ddd;
if... (16 Replies)
Discussion started by: saaisiva
16 Replies
LEARN ABOUT DEBIAN
tree::redblack
RedBlack(3pm) User Contributed Perl Documentation RedBlack(3pm)
NAME
Tree::RedBlack - Perl implementation of Red/Black tree, a type of balanced tree.
SYNOPSIS
use Tree::RedBlack;
my $t = new Tree::RedBlack;
$t->insert(3, 'cat');
$t->insert(4, 'dog');
my $v = $t->find(4);
my $min = $t->min;
my $max = $t->max;
$t->delete(3);
$t->print;
DESCRIPTION
This is a perl implementation of the Red/Black tree algorithm found in the book "Algorithms", by Cormen, Leiserson & Rivest (more commonly
known as "CLR" or "The White Book"). A Red/Black tree is a binary tree which remains "balanced"- that is, the longest length from root to
a node is at most one more than the shortest such length. It is fairly efficient; no operation takes more than O(lg(n)) time.
A Tree::RedBlack object supports the following methods:
new ()
Creates a new RedBlack tree object.
root ()
Returns the root node of the tree. Note that this will either be undef if no nodes have been added to the tree, or a
Tree::RedBlack::Node object. See the Tree::RedBlack::Node manual page for details on the Node object.
cmp (&)
Use this method to set a comparator subroutine. The tree defaults to lexical comparisons. This subroutine should be just like a
comparator subroutine to sort, except that it doesn't do the $a, $b trick; the two elements to compare will just be the first two items
on the stack.
insert ($;$)
Adds a new node to the tree. The first argument is the key of the node, the second is its value. If a node with that key already
exists, its value is replaced with the given value and the old value is returned. Otherwise, undef is returned.
delete ($)
The argument should be either a node object to delete or the key of a node object to delete. WARNING!!! THIS STILL HAS BUGS!!!
find ($)
Searches the tree to find the node with the given key. Returns the value of that node, or undef if a node with that key isn't found.
Note, in particular, that you can't tell the difference between finding a node with value undef and not finding a node at all. If you
want to determine if a node with a given key exists, use the node method, below.
node ($)
Searches the tree to find the node with the given key. Returns that node object if it is found, undef otherwise. The node object is a
Tree::RedBlack::Node object.
min ()
Returns the node with the minimal key.
max ()
Returns the node with the maximal key.
AUTHOR
Benjamin Holzman <bholzman@earthlink.net>
SEE ALSO
Tree::RedBlack::Node
perl v5.10.0 2008-07-31 RedBlack(3pm)