Home > Bash, Programming > Batch-processing script

Batch-processing script

I have developed this batch-processing script that’ll chop down files under a directory and process each group of files. Currently this bash script has the following features:
1) preview mode (option -p) lets you preview what commands will be executed
2) group files based on either
a) fixed number of files, for example, every 20 files
b) fixed bytes of file size sum, for example, every 10 MB
3) allow file list generation (which defaults to command find) to be customized by user
4) supports environment variable $VOL when the processing program is shell script (and is able to use environment variables)

For detail usage and examples, simply run bp.sh without any parameters.

View the code in (pretty) html format
View the raw codes in pure text format
[ Rename bp.sh.txt to bp.sh after downloading, the same step should be done for the following example scripts. ]
Example code 1: testbp.sh
Example code 2: testbp2.sh

Feedbacks or comments are welcome.

Categories: Bash, Programming
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: