How to output the sips image in directory

754 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 best solutions below

0
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.