echo 'ibase=16;obase=A;15A' | bc
ibase = input base
obase = output base
the default notation for both is decimal
if you want to specify decimal for obase, you should use obase=A ( A in hex = 10 in decimal )
input number must be in upper case
echo 'ibase=16;obase=A;15A' | bc
#!/bin/bash
printf "Batch Image Resize..\n"
read -p "width: " width
read -p "height:" height
[ -d resize/ ] || mkdir resize
ls -1 *.[jJ][pP][gG] | while read file
do
convert -scale ${width}x${height} "$file" resize/"$file"
[ -f "$file" ] && printf "$file\tOK\n"
done
while read var
do
..$var..
done < FILE
cat FILE |
while read var
do
..$var..
done
for var in `cat FILE`
do
..$var..
done