Tip: Multiprocessors in Shell
Last week, I need to compress more than 20k png pictures in Shell. By use the optipng, it’s easy to do. There command in Shell like this:
1 optipng *.png --dist ./dist But I need to deal with more than 20k pictures, if I use the command above to compress pictures one by one, it’s too slow!
So I think, Is there anyway to use multiprocess to speed up?
The shell language seems not to provide APIs to deal with multiprocess programming.