How to output the sips image in directory

718 views Asked by At
sips --resampleWidth 300 --out ./changedPic/A.png ./Normal/A.png 

I did this command in shell.

however it didn't make the A.png under changedPic directory but made 'changedPic' file.

It's not normal behavior of shell script though,,, How can I make A.png under changePic??

1

There are 1 answers

0
l'L'l On BEST ANSWER

You need to make the directory first if it doesn't exist:

mkdir -p ./changedPic; sips --resampleWidth 300 --out ./changedPic/A.png ./Normal/A.png 

Use the -p option to ignore the error if the directory already exists.