From 44bdda5387a29c407c801fd467306180ca4e06fe Mon Sep 17 00:00:00 2001 From: Ole Tange Date: Wed, 6 Oct 2010 20:29:16 +0200 Subject: [PATCH] parallel: Give warning if stdin is tty --- doc/FUTURE_IDEAS | 7 +++++++ src/parallel | 27 +++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/doc/FUTURE_IDEAS b/doc/FUTURE_IDEAS index f7728fdc..e27f8280 100644 --- a/doc/FUTURE_IDEAS +++ b/doc/FUTURE_IDEAS @@ -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 == (echo ; echo abc ; echo abc; echo ; echo bbc) | parallel --colsep b -v echo {1}{2} diff --git a/src/parallel b/src/parallel index 1601f5a2..d528ff3d 100755 --- a/src/parallel +++ b/src/parallel @@ -1407,6 +1407,29 @@ computers: B>B; B + +=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 is +called on other platforms file a bug report): + +B + +This will run the command B on each file put into B or +subdirs of B. + +The B<-u> is needed because of a small bug in GNU B. 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 + + =head1 QUOTING For more advanced use quoting may be an issue. The following will @@ -2577,6 +2600,10 @@ sub parse_options { $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 {