Can I use xargs to send a list of commands to a process, to be acted upon individually? Here's what I have: a file that contains numbers, one per line. The desired outcome it to send each number to a DB2 query. I thought xargs would work, but it doesn't. I tried it like this:
cat file | xargs |... (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)
Hi,
I want to find some files and then search for some lines in it with a particular pattern and then write those lines into a file. To do this I am using something like this from command prompt directly.
cd /mdat/BVG
find -name "stmt.*cl" -newer temp.txt | xargs -i awk '/BVG-/{print}' {} >... (7 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)
Hi I have multiple files for which I want to use awk for the following:
Read each line in each file- if any of the columns match "PVALUE=" followed by the number, then print the line in case the number following "PVALUE=" is greater than 0.05.
I did the following:
ls *.txt | xargs -I @ -P15... (14 Replies)
Discussion started by: ts89490
14 Replies
LEARN ABOUT MOJAVE
base
base(3pm) Perl Programmers Reference Guide base(3pm)NAME
base - Establish an ISA relationship with base classes at compile time
SYNOPSIS
package Baz;
use base qw(Foo Bar);
DESCRIPTION
Unless you are using the "fields" pragma, consider this module discouraged in favor of the lighter-weight "parent".
Allows you to both load one or more modules, while setting up inheritance from those modules at the same time. Roughly similar in effect
to
package Baz;
BEGIN {
require Foo;
require Bar;
push @ISA, qw(Foo Bar);
}
When "base" tries to "require" a module, it will not die if it cannot find the module's file, but will die on any other error. After all
this, should your base class be empty, containing no symbols, "base" will die. This is useful for inheriting from classes in the same file
as yourself but where the filename does not match the base module name, like so:
# in Bar.pm
package Foo;
sub exclaim { "I can have such a thing?!" }
package Bar;
use base "Foo";
There is no Foo.pm, but because "Foo" defines a symbol (the "exclaim" subroutine), "base" will not die when the "require" fails to load
Foo.pm.
"base" will also initialize the fields if one of the base classes has it. Multiple inheritance of fields is NOT supported, if two or more
base classes each have inheritable fields the 'base' pragma will croak. See fields for a description of this feature.
The base class' "import" method is not called.
DIAGNOSTICS
Base class package "%s" is empty.
base.pm was unable to require the base package, because it was not found in your path.
Class 'Foo' tried to inherit from itself
Attempting to inherit from yourself generates a warning.
package Foo;
use base 'Foo';
HISTORY
This module was introduced with Perl 5.004_04.
CAVEATS
Due to the limitations of the implementation, you must use base before you declare any of your own fields.
SEE ALSO
fields
perl v5.18.2 2014-01-06 base(3pm)