daily pastebin goal
53%
SHARE
TWEET

Untitled

a guest Jul 19th, 2018 55 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. 1 #!/bin/bash
  2.   2 echo "Choose the location of your images:";
  3.   3 read PATH;
  4.   4 cd $PATH;
  5.   5 cd ..;
  6.   6 #RESIZE_FOLDER="resize";
  7.   7 if [ ! -d "resize"]; then
  8.   8         #echo -n "We create the folder";
  9.   9         mkdir "resize"
  10.  10 fi
  11.  11 echo -n "Step 1: Copy files to the resize folder";
  12.  12 cp -r "$PATH/*.*" "resize/*.*";
  13.  13 if ! imagemagick >/dev/null; then
  14.  14         sudo apt-get install imagemagick
  15.  15 fi
  16.  16 echo -n "Choose the disired new size of your images:";
  17.  17 read SIZE;
  18.  18 echo -n "Choose the desired extensions for which you want to apply the resize process:";
  19.  19 read EXTENSION;
  20.  20 cd resize;
  21.  21 mogrify -resize $SIZE *.$EXTENSION;
  22.  22 echo -n "Now comes the output:";
  23.  23 echo -n "";
  24.  24 identify *.$EXTENSION;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top