Can someone please help me with how to extract the last word on a line to a new file? I have a list of names like:
Ms. Nell D. Bullock
Mrs. Sherrie M Avent
LINDA ANNETTE RUSSELL
Mr. Jerome R. Harris
Pandora Tyndall
I want the new file to look like this:
Bullock
Avent
RUSSELL
Harris... (10 Replies)
can someone tell me how can I insert a word in front of each line in a file.
i tried with sed but didn't managed yet.
Is there another command or this one(sed) works?
10x anyway. (7 Replies)
Greetings.
I am struggling with a shell script to make my life simpler, with a number of practical ways in which it could be used. I want to take a standard text file, and pull the 'n'th word from each line such as the first word from a text file.
I'm struggling to see how each line can be... (5 Replies)
Hi All,
I would like help with a script which can get rid of the first work of all lines in text file.
File 1
The name is Scott.
Output : name is Scott
---------- Post updated at 02:38 PM ---------- Previous update was at 02:37 PM ----------
Hi ALL
There is typo error in... (3 Replies)
Hello,
This is my first post on the forums. So I want to start by thanking anyone who is kind enough to read this post and offer advise. I hope to be an active contributor now that I've found these forums.
I have an issue that I figure would be a good first post..
I have 2 text files... (5 Replies)
FOLKS ,
i have a text file that is generated automatically of an another korn shell script, i want to bring in the fifth line of the text file in to my korn shell script and look for a particular word in the line . Can you all share some thoughts on this one.
thanks...
Venu (3 Replies)
Hi All,
Hope you guys had a wonderful weekend
I have a scenario where in which I have to read a file line by line
and check for few words before redirecting to a file
I have searched the forum but,either those answers dint work (perhaps because of my wrong under standing of how IFS... (6 Replies)
I have a file: file.txt, which contains the following data in it.
This is a file, my name is Karl, what is this process, karl is karl junior, file is a test file, file's name is file.txt
My name is not Karl, my name is Karl Joey
What is your name?
Do you know your name and... (3 Replies)
Discussion started by: anuragpgtgerman
3 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)