i am very new to UNIX
plz help me in this scenario
i have two text files as below
file1.txt
name=Rajakumar.
Discipline=Electronics and communication.
Designation=software Engineer.
file2.txt
name=Kannan.
Discipline=Mechanical.
Designation=CADD Design Engineer.
... (6 Replies)
Hi,
I want to replace the srting '; with ABCD'; in a file from line 1 to line 65. Is there any single command to do it without using awk
Thanks for quick reply
https://www.unix.com/images/misc/progress.gif (3 Replies)
Hello all, the title makes this sound simple, and maybe it should be.
This is by code:
#!/bin/sh
cp ch25.txt ch25.fn.tex
n=`grep -c '^\' ch25_footnotes.txt > temp`
r=`awk -F] '{print $2}' temp`
`sed 's/\/\\footnote{$r}/' ch25.fn.tex`
done
This is what I am trying to... (6 Replies)
Hi All,
I have a file, let's call it "info.tmp" that contains data like this ..
ABC123456
PCX333445
BCD789833
I need to read "info.tmp" and for each line add strings in a way that the final output is
put /logs/ua/dummy.trigger 'AAA00001.FTP.XXX.BLA03A01.xxxxxx(+1)'
where XXX... (5 Replies)
Can someone tell me how I can do this?
e.g:
Say file1.txt contains:
today is monday
the 22 of
NOVEMBER
2010
and file2.txt contains:
the
11th
month
of
How do i replace the word NOVEMBER with (5 Replies)
Hi
I am not the best scripter in the world and have run into a issue which you might be able to guide me on...
I have two files.
File1 :
A123, valueA, valueB
B234, valueA, valueB
C345, valueA, valueB
D456, valueA, valueB
E567, valueA, valueB
F678, valueA, valueB
File2:
C345,... (5 Replies)
I have a LOG file which looks like this
Import started at: Mon Jul 23 02:13:01 EDT 2012
Initialization completed in 2.146 seconds.
--------------------------------------------------------------------------------
--
Import summary for Import item: PolicyInformation... (8 Replies)
I don't know if it's been asked before but seems i gave up seeking.
i have 2 files :
file1.txt
Monday XXXX
Tuesday XXXX
XXXX Wednesday
Thursday XXXX
XXXX is in every lines of file1.txt and i want to replace them with each line in file2.txt:
home
school
cinema
so output file is:
... (19 Replies)
HI
Can any one guide me how to achieve this task. I have 2 files
env.txt
#Configuration.Properties values
identity_server_url = http://identity.test-hit.com:9783/identity/service/user/register
randon_password_length = 6
attachment_file_path = /pass/temp/attachments/... (1 Reply)
Hi Everyone,
I have a requirement in ksh where i have a set of files in a directory. I need to search each and every file if a particular string is present in the file, delete that line and replace that line with another string expression in the same file.
I am very new to unix. Kindly help... (10 Replies)
Discussion started by: Pradhikshan
10 Replies
LEARN ABOUT DEBIAN
io::async::pid
IO::Async::PID(3pm) User Contributed Perl Documentation IO::Async::PID(3pm)NAME
"IO::Async::PID" - event callback on exit of a child process
SYNOPSIS
use IO::Async::PID;
use POSIX qw( WEXITSTATUS );
use IO::Async::Loop;
my $loop = IO::Async::Loop->new;
my $kid = $loop->fork(
code => sub {
print "Child sleeping..
";
sleep 10;
print "Child exiting
";
return 20;
},
);
print "Child process $kid started
";
my $pid = IO::Async::PID->new(
pid => $kid,
on_exit => sub {
my ( $self, $exitcode ) = @_;
printf "Child process %d exited with status %d
",
$self->pid, WEXITSTATUS($exitcode);
},
);
$loop->add( $pid );
$loop->run;
DESCRIPTION
This subclass of IO::Async::Notifier invokes its callback when a process exits.
For most use cases, a IO::Async::Process object provides more control of setting up the process, connecting filehandles to it, sending data
to and receiving data from it.
EVENTS
The following events are invoked, either using subclass methods or CODE references in parameters:
on_exit $exitcode
Invoked when the watched process exits.
PARAMETERS
The following named parameters may be passed to "new" or "configure":
pid => INT
The process ID to watch. Must be given before the object has been added to the containing "IO::Async::Loop" object.
on_exit => CODE
CODE reference for the "on_exit" event.
Once the "on_exit" continuation has been invoked, the "IO::Async::PID" object is removed from the containing "IO::Async::Loop" object.
METHODS
$process_id = $pid->pid
Returns the underlying process ID
$pid->kill( $signal )
Sends a signal to the process
AUTHOR
Paul Evans <leonerd@leonerd.org.uk>
perl v5.14.2 2012-10-24 IO::Async::PID(3pm)