I need to remove the '&' from a file.
In each line of the file, the fields are separated by ^K.
I only want to remove '&' if it exists in field number 9. (example of field 9: abc&xyz)
I need to do an in place/in line edit.
So far I have accomplished the following:
awk -F '^K' '{print... (6 Replies)
Col1 Col2 Col3 Col4
12 Completed 08 0830
12 In Progress 09 0829
11 For F U 07 0828
Considering the file above, how could i replace the third column the most efficient way? The actual file size is almost 1G. I am... (10 Replies)
I have the follwoing file:
This looks to be : seperated.
For the first field i want only the file name without ".txt" and also i want to remove "+" sign if the second field starts with "+" sign.
Input file:
Output file:
Appreciate your help (9 Replies)
What is an efficient way to remove all lines from the input file which contain a file name?
inputfile:
=======================
# comment
# comment
# comment
5 8 10 /tmp
5 8 10 /var/run
5 8 10 /etc/vfstab
5 8 9 /var/tmp
5 8 10 /var/adm/messages... (7 Replies)
I'm having a couple of issues. I'm trying to edit a nagios config and remove a host definition if a certain "host_name" is found. My thought is I would find host definition block containing the host_name I'm looking for and output the line numbers for the first and last lines. Using set, I will... (9 Replies)
please help me to edit the second field using awk or sed
i have input file below
aa1001 000001
bb1002 000002
cc1003 000003
so i want the output file like below
aa1001 01
bb1002 02
cc1003 03 (38 Replies)
Hi Experts,
I am new to shell scripting. Need some help in doing one task given by the customer.
The sample record in a file is as follows:
3538,,,,,,ID,ID1,,,,,,,,,,,
It needs to be the following:
3538,,353800,353800,,,ID,ID1,,,,,COLX,,,,,COLY,
And i want to modify this record in... (3 Replies)
I've ended up with a small collection of libraries I like to use with awk, but this means I can't do awk -f librarycode.awk '{ program code }' filename because awk will assume that anything after -f is a filename, not code. Is there any way I can do both? (6 Replies)
Hello,
Just surfed on the web for probable answers but could not get them working.
I wish to replace the string containing spaces by another phrase but below answers did not work.
My string is:
PAIN & GAIN
I wish to convert it to:
P&G
I just need it working with sed with function -i
... (6 Replies)
Discussion started by: baris35
6 Replies
LEARN ABOUT MOJAVE
inline::wrapper::module5.18
Inline::Wrapper::Module(3) User Contributed Perl Documentation Inline::Wrapper::Module(3)NAME
Inline::Wrapper::Module - Internal object wrapper for individual Inline modules.
SYNOPSIS
use Inline::Wrapper::Module;
DESCRIPTION
Inline::Wrapper::Module is used internally by Inline::Wrapper, and should not be used directly. It will croak if you attempt to do so.
It is a descendent class of Inline::Wrapper.
METHODS
new()
Takes the same arguments as "new()" in Inline::Wrapper, but also requires a module_name and lang_ext argument.
Don't use this. It will croak if you try to use it directly.
initialize()
Initialize the object instance.
DESTROY()
Destructor to clean up the object instance, and wipe the private code module namespace created when binding the symbol list.
INHERITANCE
As Inline::Wrapper::Module is an inherited class from Inline::Wrapper, all methods that apply to the base class also apply to objects of
this class.
However, note that this has the following effects, due to the semantics of the load()/run() steps:
auto_reload settings vs. when method effects take place:
auto_reload value: | FALSE TRUE
--------------------+------------------------------------------
set_base_dir() | no effect after next reload / run()
set_language() | no effect after next reload / run()
add_language() | no effect after next reload / run()
Please read through "load()" in Inline::Wrapper and "run()" in Inline::Wrapper for insight into why the implementation works like this.
SEE ALSO
Inline::Wrapper
The Inline documentation.
The Inline-FAQ list.
The examples/ directory of this module's distribution.
AUTHOR
Please kindly read through this documentation and the examples/ thoroughly, before emailing me with questions. Your answer is likely in
here.
Also make sure that your issue is actually with the Inline::Wrapper modules, and not with Inline itself.
Jason McManus (INFIDEL) -- "infidel AT cpan.org"
LICENSE
Copyright (c) Jason McManus
This module may be used, modified, and distributed under the same terms as Perl itself. Please see the license that came with your Perl
distribution for details.
perl v5.18.2 2010-03-10 Inline::Wrapper::Module(3)