Hello. I am trying to convert occurrences of 'NULL' from a datafile. The 'NULL' occurences appears at this:
|NULL| NULL|NULL| NULL|NULL| NULL|NULL| NULL|
There should be 52 fields per line.
I would like any occurrence of | NULL| or |NULL| to appear as '||'
Currently I am using this sed... (2 Replies)
Hi Gurus,
I have a small requirement.
Let suppose i have a file test.txt
test.txt contains
Dispatched date = '2008-04-08'
Name = 'Logers'
Now i want to add one more line to it as Number of Responses = "$a"
$a will be chnaging dynamically which i had grepped it in the script.
Now i... (6 Replies)
Hi All,
I am facing a small problem in sed. I want to insert a line in the existing file.
Existing code:
access to attr=userPassword
by self write
by * auth
access to *
by self write
by users read
by anonymous auth
Desired code:
access to attr=userPassword
by self... (14 Replies)
Hi All,
I need to pick up data on both sides of "=" sign.
For eg, following is the context that I have.
125.156.125.147=machine1
147.125.185.156=machine2
147.125.185.159=machine3
Can I have the ip address in one variable and machine name in another variable using sed or awk.
... (1 Reply)
Hi
I have a file, with format like:
column1|coulumn2|column3|column4
A|X|K|18
L|O|R|31,42,25
G|H|I|55,66
L|E|Q|25,31,94
output required:
column1|coulumn2|column3|column4
A|X|K|18
L|O|R|31,25
L|E|Q|25,31
Input File Format: All columns are seperated using |, last column... (8 Replies)
Hello everyone,
unfortunately I am no unix nor scripting guru, which is why I am asking for help here. I am trying to reformat a .csv file using sed or awk which has the following format:
a,b,C-D-E,f,g
h,i,J,k,l
m,n,O-P-Q-R-S,t,u
v,w,X-Y,z,a
It's basically a 5-field text file which has an... (7 Replies)
This post is in reference to https://www.unix.com/shell-programming-scripting/137977-tricky-sed-awk-question-post302428154.html#post302428154
I am trying to go the opposite direction now:
I have the following file:
a,b,C,f,g
a,b,D,f,g
a,b,E,f,g
h,i,J,k,l
m,n,O,t,u
m,n,P,t,u
m,n,Q,t,u... (3 Replies)
Hi,
I have a file which contains two strings: AAAAA and BBBBB
I have two variables in my script:
DATE="03/21/2010"
aDate="20100321"
I need to replace string AAAAA with variable $DATE and BBBBB with $aDate. Here is what I do
sed "s/AAAAA/$DATE/" $BASIC_TMPLT | sed "s/BBBBB/$aDate/" >... (4 Replies)
Hi All,
I have one file with below type of data in it,
$ cat test.txt
###123
###xyxytuerwb
###2
###tyupe
Here I would like to replace all the characters with "x" after the 3 "###" with the same number of characters.
Can you please help me to achieve this. (7 Replies)
Hi
Can some one tell what does this sed command do
sed 's/*$//g
I am more curious on the highlighted part , can some one explain what does that mean.
Thanks
Sri (1 Reply)
Discussion started by: Sri3001
1 Replies
LEARN ABOUT DEBIAN
io::async::signal
IO::Async::Signal(3pm) User Contributed Perl Documentation IO::Async::Signal(3pm)NAME
"IO::Async::Signal" - event callback on receipt of a POSIX signal
SYNOPSIS
use IO::Async::Signal;
use IO::Async::Loop;
my $loop = IO::Async::Loop->new;
my $signal = IO::Async::Signal->new(
name => "HUP",
on_receipt => sub {
print "I caught SIGHUP
";
},
);
$loop->add( $signal );
$loop->run;
DESCRIPTION
This subclass of IO::Async::Notifier invokes its callback when a particular POSIX signal is received.
Multiple objects can be added to a "Loop" that all watch for the same signal. The callback functions will all be invoked, in no particular
order.
EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters:
on_receipt
Invoked when the signal is received.
PARAMETERS
The following named parameters may be passed to "new" or "configure":
name => STRING
The name of the signal to watch. This should be a bare name like "TERM". Can only be given at construction time.
on_receipt => CODE
CODE reference for the "on_receipt" event.
Once constructed, the "Signal" will need to be added to the "Loop" before it will work.
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2012-10-24 IO::Async::Signal(3pm)