Hi there,
I am trying to move around 3000 files from one directory to another. The mv command is complaining from too many arguments. I tried to use the xargs command but with no luck. Could some body provide help?
Regards (4 Replies)
I discovered that GNU's xargs has a -P option to allow its processes to run in parallel. Great! Is this a GNU thing, or is it supported by other platforms as well? (4 Replies)
Hi,
I have a requirement to RCP the files from remote server to local server.
Also the RCP has to run in parallel. However using 'xargs' retrives 2 file names during each loop. How do we restrict to only one file name using xargs and loop till remaining files.
I use the below code for... (2 Replies)
Hello there,
Let me show you a simple example of what I am trying to achieve:
1) I have an input text file with some lines:
1 a
2 b
3 c
2) And I want to run a command with these lines as arguments (+ arbitrary extra arguments). For example:
$ command "1 a" "2 b" "3 c" "bye"
I... (7 Replies)
hi
Could any one please tell me the option using which we can run multiple commands using xargs
I have list of files, I want to run dos2unix and chmod at one shot on them
I tried google n searched man pages but couldnt really find the solution , please help
right now im doing this
ls... (4 Replies)
Dear all ,
any suggest on xargs to combine from (1.txt and 2.txt) to output.txt ?
thanks a lot.
1.txt
0123 BUM-5M BUM-5M 93490481 63839
0124 BUM-5M BUM-5M 112112 ... (3 Replies)
Using the bash shell I'm trying to either create a command for the command line or a script that will show netstat info for a given process name. Here is an example of what I'm trying to do:$ ps aux |grep catalina |grep -v grep | awk '{print $2}'
5132
$ netstat -nlp |grep 5132
(Not all processes... (11 Replies)
Hi,
can anyone tell me in detail ?
what the following do in detail ?
I am trying to get a largest number in a list
Thanks
Tao
LARGEST=$(echo $* | xargs -n1 | sort -nr | tail -1) (3 Replies)
Discussion started by: ccp
3 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)