mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-26 07:57:58 +00:00
parallel: Give warning if stdin is tty
This commit is contained in:
parent
692bb88453
commit
44bdda5387
|
@ -1,3 +1,10 @@
|
||||||
|
== Change number of jobs while running ==
|
||||||
|
|
||||||
|
Read -j from file. If the file is changed when a job completes the
|
||||||
|
file is re-read and the new number of jobs computed. If the number is
|
||||||
|
lower than before currently running jobs will be allowed to finish but
|
||||||
|
new jobs will not be started.
|
||||||
|
|
||||||
== Bug ==
|
== Bug ==
|
||||||
|
|
||||||
(echo ; echo abc ; echo abc; echo ; echo bbc) | parallel --colsep b -v echo {1}{2}
|
(echo ; echo abc ; echo abc; echo ; echo bbc) | parallel --colsep b -v echo {1}{2}
|
||||||
|
|
27
src/parallel
27
src/parallel
|
@ -1407,6 +1407,29 @@ computers:
|
||||||
|
|
||||||
B<echo >>B<jobqueue>; B<tail -f jobqueue | parallel -S ..>
|
B<echo >>B<jobqueue>; B<tail -f jobqueue | parallel -S ..>
|
||||||
|
|
||||||
|
|
||||||
|
=head1 EXAMPLE: GNU Parallel as dir processor
|
||||||
|
|
||||||
|
If you have a dir in which users drop files that needs to be processed
|
||||||
|
you can do this on GNU/Linux (If you know what B<inotifywait> is
|
||||||
|
called on other platforms file a bug report):
|
||||||
|
|
||||||
|
B<inotifywait -q -m -r -e CLOSE_WRITE --format %w%f my_dir | parallel
|
||||||
|
-u echo>
|
||||||
|
|
||||||
|
This will run the command B<echo> on each file put into B<my_dir> or
|
||||||
|
subdirs of B<my_dir>.
|
||||||
|
|
||||||
|
The B<-u> is needed because of a small bug in GNU B<parallel>. If that
|
||||||
|
proves to be a problem, file a bug report.
|
||||||
|
|
||||||
|
You can of course use B<-S> to distribute the jobs to remote
|
||||||
|
computers:
|
||||||
|
|
||||||
|
B<inotifywait -q -m -r -e CLOSE_WRITE --format %w%f my_dir | parallel -S ..
|
||||||
|
-u echo>
|
||||||
|
|
||||||
|
|
||||||
=head1 QUOTING
|
=head1 QUOTING
|
||||||
|
|
||||||
For more advanced use quoting may be an issue. The following will
|
For more advanced use quoting may be an issue. The following will
|
||||||
|
@ -2577,6 +2600,10 @@ sub parse_options {
|
||||||
$Global::default_simultaneous_sshlogins;
|
$Global::default_simultaneous_sshlogins;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(-t $Global::argfile) {
|
||||||
|
print STDERR "$Global::progname: Input is tty. Press CTRL-D to exit.\n";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sub read_args_from_command_line {
|
sub read_args_from_command_line {
|
||||||
|
|
Loading…
Reference in a new issue