11 lines
318 B
Bash
Executable File
11 lines
318 B
Bash
Executable File
# Read first argument from command line: input folder name
|
|
INPUT_DIR=$1
|
|
OUTPUT_DIR=$INPUT_DIR-bw
|
|
|
|
# Only make an output folder if it does not exist yet
|
|
mkdir -p $OUTPUT_DIR
|
|
|
|
for IMG in $(ls $INPUT_DIR); do
|
|
echo "$INPUT_DIR/$IMG ---> $OUTPUT_DIR/$IMG" && convert $INPUT_DIR/$IMG -colorspace Gray $OUTPUT_DIR/$IMG;
|
|
done
|