hi,
How can I check for a field in a pipe-delimited file having a NULL value in Unix using a grep command or any other command.
Please reply (5 Replies)
Hi:
I have a text file date(pipe delimited) which is loaded in to the DB using sql loader(&CTL files) after some initial validation by the shell script.
Now i have a situation where the shell script needs to check a column in the text file and if it is NULL then it needs send this record/row... (12 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)
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)
Hi,
I am trying to find the lines in a pipe delimited file where 11th column has not null values. Any help is appreciated. Need help asap please.
thanks in advance. (3 Replies)
Hi guys,
I need to know how i can ignore Pipe '|' if Pipe is coming as a column in Pipe delimited file
for eg:
file 1:
xx|yy|"xyz|zzz"|zzz|12...
using below awk command
awk 'BEGIN {FS=OFS="|" } print $3
i would get xyz
But i want as :
xyz|zzz to consider as whole column... (13 Replies)
Hi All,
I have a large dat file where each lines are pipe delimited values. I need to parse the file depending on the request. For example: sometimes I have told to remove all the values in the 7th column (this case remove values '3333' only from the first line and '3543' from the second line)... (4 Replies)
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)
Hi,
I have a requirement where I have to check whether the mandatory columns in a pipe delimited file is null and print error message.
For eg, I have to check if the 3rd,5th,6th,7th and 8th column are null and print the message "<column name> is null".
The data file will have aroung 100,000... (6 Replies)
Discussion started by: reshma15193
6 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)