1
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??

whitebear
  • 11,200
  • 24
  • 114
  • 237

1 Answers1

1

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.

l'L'l
  • 44,951
  • 10
  • 95
  • 146