I have some .dat files that I cannot open and read the data. It is an awk program file, and my question would be to you all is there a way to convert this awk file to ascii text?
Thanks (10 Replies)
Hi Friends,
I need your help.
I am not able to execute one awk program .If you can solve the following small program
then i can solve other one.
$ vi prg
#!/bin/awk -f
BEGIN {
# Print the squares from 1 to 10 the first way
i=1;
while (i <= 10) {
... (3 Replies)
Hi all,
I need to grep the 3 characters from a file, and to fetch the corresponding words to that character. My file is in the following format..
The below text will be in the separate file....say file2.txt
ABC This is the first text.
DEF This is the second text.
GH1 9.8.7890
AB1... (1 Reply)
:(Hi all,
I have a doubt in AWK program. I am writing an awk program which accepts a parameter as input and it should display the corresponding details.
if the country as "US" it should be displayed as "United States of America"
and the country as "IN" India should be displayed. How can I... (2 Replies)
Hi all,
I have the following problem and hope someone could help me.
I have 184 files, each with 5 columns (c1, c2, c3, c4, c5). I am only interrested in column 5, and would like to paste column 5 from all the 184 files into one file. I have tried the following with two files
awk... (20 Replies)
Hi
I have many problems with a script. I have a script that formats a text file but always prints the same error when i try to execute it
The code is that:
{
if (NF==17){
print $0
}else{
fields=NF;
all=$0;
while... (2 Replies)
Dear All,
facing problem to get data in different fields. SO i am using # to get the data..
please refer my code below...
BEGIN { FS=" " }
{
if ( $1 == "START" )
{
i = i+1;
SFILENAME = FILENAME
}
if ( substr($1,2,8) == "filename" )
... (1 Reply)
i have two files,
one looks like this (file1):
novelMiR_892 novelMiR_891,
novelMiR_852
novelMiR_893
novelMiR_1661
novelMiR_854
novelMiR_1210
novelMiR_1251
novelMiR_855
novelMiR_1252
novelMiR_897 novelMiR_2336,novelMiR_2335,and the second like this... (5 Replies)
Hi All,
I have an AWK code snippet which I want to use in Perl. How can I achieve the same thing in perl? Here I am searching for a pattern in a file and from that matching line, I am extracting the 3rd column value and storing it in a variable which I later on use this value in a if condition.
... (2 Replies)
Hi All ,
I have set of input files with one of the fields as below
File 1 -Field 1=BUDGET_CURR_FX
File 2 -Field 1=BUDGET_MTH_AVGFX
File 3 -Field 1=BUDGET_PREV
Now i need to include one extra field in the new file as below
Output File 1 -Field 1= BUDGET Field2=CURRENT_FX
Output File... (2 Replies)
Discussion started by: Hypesslearner
2 Replies
LEARN ABOUT DEBIAN
modperl::global
libapache2-mod-perl2-2.0.7::docs::api::ModPerl::Global(3User Contributed Perl Documentalibapache2-mod-perl2-2.0.7::docs::api::ModPerl::Global(3pm)NAME
ModPerl::Global -- Perl API for manipulating special Perl lists
Synopsis
use ModPerl::Global ();
my $package = 'MyApache2::Package';
# make the END blocks of this package special
ModPerl::Global::special_list_register(END => $package);
# Execute all encoutered END blocks from this package now
ModPerl::Global::special_list_call( END => $package);
# delete the list of END blocks
ModPerl::Global::special_list_clear( END => $package);
Description
"ModPerl::Global" provides an API to manipulate special perl lists. At the moment only the "END" blocks list is supported.
This API allows you to change the normal Perl behavior, and execute special lists when you need to.
For example "ModPerl::RegistryCooker" uses it to run "END" blocks in the scripts at the end of each request.
Before loading a module containing package $package, you need to register it, so the special blocks will be intercepted by mod_perl and not
given to Perl. "special_list_register" does that. Later on when you want to execute the special blocks, "special_list_call" should be
called. Unless you want to call the list more than once, clear the list with "special_list_clear".
API
"ModPerl::Global" provides the following methods:
"special_list_call"
Call the special list
$ok = special_list_call($key => $package);
arg1: $key ( string )
The name of the special list. At the moment only 'END' is supported.
arg2: $package ( string )
what package to special list is for
ret: $ok ( boolean )
true value if $key is known, false otherwise.
since: 2.0.00
"special_list_clear"
Clear the special list
$ok = special_list_clear($key => $package);
arg1: $key ( string )
The name of the special list. At the moment only 'END' is supported.
arg2: $package ( string )
what package to special list is for
ret: $ok ( boolean )
true value if $key is known, false otherwise.
since: 2.0.00
"special_list_register"
Register the special list
$ok = special_list_call($key => $package);
arg1: $key ( string )
The name of the special list. At the moment only 'END' is supported.
arg2: $package ( string )
what package to special list is for
ret: $ok ( boolean )
true value if $key is known, false otherwise.
since: 2.0.00
Notice that you need to register the package before it is loaded. If you register it after, Perl has already compiled the "END" blocks and
there are no longer under your control.
See Also
mod_perl 2.0 documentation.
Copyright
mod_perl 2.0 and its core modules are copyrighted under The Apache Software License, Version 2.0.
Authors
The mod_perl development team and numerous contributors.
perl v5.14.2 2011-02-08 libapache2-mod-perl2-2.0.7::docs::api::ModPerl::Global(3pm)