09-09-2009
Thanks Deepaks. That worked. What exactly is the command saying?
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Guys,
i used egrep "pattern1|pattern2". But the whole word is searched. But i want the output if only the exact word is matched. i.e the output is got evenif a part of the pattern is matched.
I tried the -w opion but its showing usage error.
Please help me out on this one. please sent me... (2 Replies)
Discussion started by: meheretoknow
2 Replies
2. Shell Programming and Scripting
How can
grep G.*schema
give me the result: ${Gacntg_dt}""'"'
doesn't G.*schema say give me an unlimited number of characters between G and schema?
:confused: (3 Replies)
Discussion started by: danmauer
3 Replies
3. Shell Programming and Scripting
I have a file where in I need to add gctunit1/gtdivcompebb1/ after the = sign
for example:
gtfix31/gctunit_gtdivcompebb1/csclkswcompbypassstepgnnnh = gctunit1/gtdivcompebb1/csclkswcompbypassstepgnnnh (3 Replies)
Discussion started by: pitagi
3 Replies
4. Shell Programming and Scripting
Hi,
I'm currently working on a shell script to automate a backup check on oracle database. My requirement is to grep the words between two delimiters and pass on to a variable..
for ex I have following values in my log file...
(DB_NAME), (163.24 25), (16/02/10 23:40), (COMPLETED),
I want... (5 Replies)
Discussion started by: senthil3d
5 Replies
5. UNIX for Dummies Questions & Answers
Hi all ,
i need an help here.!!!! i have a file that contains /etc/passwd files from some servers.
i need a script which search for presence of a user in the servers.
like if i give 51144 to the script. the should be o/p
Please help on this..... (4 Replies)
Discussion started by: sudharson
4 Replies
6. Windows & DOS: Issues & Discussions
We are using Red Hat. We have a issue like this: We want to print from Linux, to a printer attached to a Windows machine. What we want to print is a PDF. It prints, but the printing starts from the middle of the page. In the report, there is no space at the top but still printing starts from the... (5 Replies)
Discussion started by: rohan69
5 Replies
7. Shell Programming and Scripting
I have the following file :
1 2 3 4 5
6 7 8 9 0
9 8 7 6 5
4 3 2 1 0
0 1 2 3 4
Write scripts to
get the following outputs :
A)
1
7
7
1
4 (11 Replies)
Discussion started by: pssooraj72
11 Replies
8. UNIX for Dummies Questions & Answers
Hi,
I have a tab delimited text file with three columns:
Input:
1 25734 25737
1 32719 32724
1 59339 59342
1 59512 59513
1 621740 621745
For each row of the text file I want to print out all the values between the second and third columns, including them. The... (3 Replies)
Discussion started by: evelibertine
3 Replies
9. UNIX for Dummies Questions & Answers
This could be a really dummy question.
I have a log text file.
What unix command to extract line from specific string to another specific string.
Is it something similar to?:
more +/"string" file_name
Thanks (4 Replies)
Discussion started by: aku
4 Replies
10. Shell Programming and Scripting
Hi,
I need help with following. I need to exclude words that match following patterns
a. more than length 4 (example SBRAP)
b. contains mixture uppercase and lower case regardless of the length (example GSpD)
File contains
COFpC
MCHX
SP
SNFCA
GEH
SBRAP
DGICA
JPMpE
WFCpP
GSpD
AXL... (5 Replies)
Discussion started by: jakSun8
5 Replies
LEARN ABOUT REDHAT
symbol
Symbol(3pm) Perl Programmers Reference Guide Symbol(3pm)
NAME
Symbol - manipulate Perl symbols and their names
SYNOPSIS
use Symbol;
$sym = gensym;
open($sym, "filename");
$_ = <$sym>;
# etc.
ungensym $sym; # no effect
# replace *FOO{IO} handle but not $FOO, %FOO, etc.
*FOO = geniosym;
print qualify("x"), "
"; # "Test::x"
print qualify("x", "FOO"), "
" # "FOO::x"
print qualify("BAR::x"), "
"; # "BAR::x"
print qualify("BAR::x", "FOO"), "
"; # "BAR::x"
print qualify("STDOUT", "FOO"), "
"; # "main::STDOUT" (global)
print qualify(*x), "
"; # returns *x
print qualify(*x, "FOO"), "
"; # returns *x
use strict refs;
print { qualify_to_ref $fh } "foo!
";
$ref = qualify_to_ref $name, $pkg;
use Symbol qw(delete_package);
delete_package('Foo::Bar');
print "deleted
" unless exists $Foo::{'Bar::'};
DESCRIPTION
"Symbol::gensym" creates an anonymous glob and returns a reference to it. Such a glob reference can be used as a file or directory handle.
For backward compatibility with older implementations that didn't support anonymous globs, "Symbol::ungensym" is also provided. But it
doesn't do anything.
"Symbol::geniosym" creates an anonymous IO handle. This can be assigned into an existing glob without affecting the non-IO portions of the
glob.
"Symbol::qualify" turns unqualified symbol names into qualified variable names (e.g. "myvar" -> "MyPackage::myvar"). If it is given a sec-
ond parameter, "qualify" uses it as the default package; otherwise, it uses the package of its caller. Regardless, global variable names
(e.g. "STDOUT", "ENV", "SIG") are always qualified with "main::".
Qualification applies only to symbol names (strings). References are left unchanged under the assumption that they are glob references,
which are qualified by their nature.
"Symbol::qualify_to_ref" is just like "Symbol::qualify" except that it returns a glob ref rather than a symbol name, so you can use the
result even if "use strict 'refs'" is in effect.
"Symbol::delete_package" wipes out a whole package namespace. Note this routine is not exported by default--you may want to import it
explicitly.
perl v5.8.0 2002-06-01 Symbol(3pm)