Hi,
I have a file name, for which I want to strip out the first bit and leave the rest...
So I want to take the file name .lockfile-filename.10001 ,strip it and have only filename.10001 ...
Thanking you all inadvance,
Zak (6 Replies)
I need to get a section of a file based on 2 params. I want the part of the file between param 1 & 2. I have tried a bunch of ways and just can't seem to get it right. Can someone please help me out.....its much appreciated. Here is what I have found that looks like what I want....but doesn't... (12 Replies)
Hi,
I have tried many times to add the string into the first line of the file or the middle of the file but could not find the solution.
I first tried by
$echo "paki" >> file
This code only append paki string at the end of file "file" but how can i add this "paki" into the first line or... (5 Replies)
Hello ,
I have huge file with below content. I need to read the numeric values with in the paranthesis after = sign. Please help me with awk and sed script for it.
11.10.2009 04:02:47 Customer login not found: identifier=(0748502889) prefix=(TEL) serviceCode=().
11.10.2009 04:03:12... (13 Replies)
Hello
How do i check that correct input files are used while using AWk and SED for file manipulation?
e.g
awk '/bin/ {print $0 }' shell.txt
sed 's/hp/samsung/' printers.txt
how do i ensure that the correct input files I am working with are used? (5 Replies)
Is there an awk, sed, vi or any line command that adds Field Separators (default spaces) to each line in a file?
$cat RegionalData
12FC2525MZLP8266900216
12FC2525MZLP8266900216
12FC2525NBLP8276900216
12FC2525NBLP8276900216
Desired results:
1 2 F C 2525 MZ LP 826 690 02 16
1 2 F C... (2 Replies)
Ok, so I have a bash script with an embedded expect statement.
Inside of the expect statement, i'm trying to pull all of the non-comment lines from the /etc/oratab file one at a time.
Here's my command:
cat /etc/oratab |sed /^s*#/d\ | awk 'NR==1'|awk -F: '{print \"$1\"}'|. oraenv
Now,... (0 Replies)
Hi All, Need Suggestion, Want to sort a file using awk & sed to get required, output as below, such that each LUN shows correct WWPN and FA port Numbers correctly:
Required output:
01FB 10000000c97843a2 8C 0
01FB 10000000c96fb279 9C 0
22AF 10000000c97843a2 8C 0
22AF 10000000c975adbd ... (10 Replies)
Hello,
Beginning with shell scipting, I'm trying to find in a csv file, the lines where the field related to hostname is displayed as an FQDN intead the hostname. (some lines are correct) and the to correct that inside the file:
Novell,11.0,UNIX Server,bscpsiws02,TxffnX1tX1HiDoyBerrzWA==... (2 Replies)
Guys, I have a variable in a script that I want to transform to into something else Im hoping you guys can help. It doesn't have to use sed/awk but I figured these would be the simplest.
DATE=20160120
I'd like to transform $DATE into "01-20-16" and move it into a new variable called... (8 Replies)
Discussion started by: dendenyc
8 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)