mirror of
https://git.savannah.gnu.org/git/parallel.git
synced 2024-11-25 15:37:56 +00:00
Makefile updated with new dir
Documentation changes
This commit is contained in:
parent
9d593557ce
commit
84118cb14b
2
Makefile
2
Makefile
|
@ -17,7 +17,7 @@ dist:
|
|||
rm -rf ./unittest/input-files/random_dirs_*_newline || /bin/true
|
||||
rm -rf ./unittest/tmp || /bin/true
|
||||
rm parallel-????????.tar.bz2 || /bin/true
|
||||
( cd ..; tar -cvj --exclude .git --exclude '#*#' --exclude '*~' --exclude CVS -f /tmp/parallel.tar.bz2 parallel )
|
||||
( cd ..; tar -cvj --exclude .git --exclude '#*#' --exclude '*~' --exclude CVS -f /tmp/parallel.tar.bz2 parallel-[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9] )
|
||||
mv /tmp/parallel.tar.bz2 parallel-$$(date +"%Y%m%d").tar.bz2
|
||||
rsync -Havessh parallel-$$(date +"%Y%m%d").tar.bz2 download.savannah.nongnu.org:/releases/parallel/
|
||||
|
||||
|
|
14
parallel
14
parallel
|
@ -199,26 +199,26 @@ B<ls | parallel 'echo -n {}" "; ls {}|wc -l'>
|
|||
|
||||
To put the output in a file called <name>.dir:
|
||||
|
||||
B<ls | parallel '(echo -n {}" "; ls {}|wc -l) >>B< {}.dir'>
|
||||
B<ls | parallel '(echo -n {}" "; ls {}|wc -l) >> B<{}.dir'>
|
||||
|
||||
|
||||
=head1 EXAMPLE 6: Context replace
|
||||
|
||||
To remove the files I<pict1000.jpg> .. I<pict9999.jpg> you could do:
|
||||
To remove the files I<pict0000.jpg> .. I<pict9999.jpg> you could do:
|
||||
|
||||
B<seq 1000 9999 | parallel rm pict{}.jpg>
|
||||
B<seq -f %04g 0 9999 | parallel rm pict{}.jpg>
|
||||
|
||||
You could also do:
|
||||
|
||||
B<seq 1000 9999 | perl -pe 's/(.*)/pict$1.jpg/' | parallel -x rm>
|
||||
B<seq -f %04g 0 9999 | perl -pe 's/(.*)/pict$1.jpg/' | parallel -x rm>
|
||||
|
||||
The first will run B<rm> 8999 times, while the last will only run
|
||||
The first will run B<rm> 10000 times, while the last will only run
|
||||
B<rm> as many times needed to keep the command line length short
|
||||
enough.
|
||||
enough (typically 1-2 times).
|
||||
|
||||
You could also run:
|
||||
|
||||
B<seq 1000 9999 | parallel -X rm pict{}.jpg>
|
||||
B<seq -f %04g 0 9999 | parallel -X rm pict{}.jpg>
|
||||
|
||||
This will also only run B<rm> as many times needed to keep the command
|
||||
line length short enough.
|
||||
|
|
Loading…
Reference in a new issue