LinuxQuestions.org

LinuxQuestions.org (http://www.linuxquestions.org/questions/index.php)
-   Linux - General (http://www.linuxquestions.org/questions/forumdisplay.php?f=1)
-   -   OSX - command not working properly (http://www.linuxquestions.org/questions/showthread.php?t=4175459804)

Predatorian 04-27-2013 01:30 PM

OSX - command not working properly
 
I am sick of registering for forums upon forums, so I'm coming here.

I keep getting this error when trying to convert a series of gif's to pdf's. I can do it one by one, but I have 200 gif's i'm trying to make into PDF's so I can combine them.

Code:

for i in *.gif; do sips -s format pdf $i --out test/$i.pdf;done
Code:

Error 10: out_dir_not_found /Users/haylon/Desktop/Battletech/Technical Readouts/Tech readout 2750/test/test
Try 'sips --help' for help using this tool



--EDIT--

Remove the test/ in front of the $i and it works. I couldn't find the delete button for this, so, I apologize if I look stupid.

unSpawn 04-28-2013 05:46 AM

Quote:

Originally Posted by Predatorian (Post 4940145)
Remove the test/ in front of the $i and it works.

Thanks for sharing.


Quote:

Originally Posted by Predatorian (Post 4940145)
I couldn't find the delete button for this, so, I apologize if I look stupid.

Post contents should not be deleted, made illegible or otherwise mutilated because others may learn from it and its responses (if any).
You shared your fix, that's good and that's all that matters.
Asking isn't stupid, not asking is.


BTW this would create a subdirectory "output" if it doesn't exist and output the PDF there:
Code:

find /some/path -type f -iname \*.gif | while read ITEM; do
 OUT_DIR="$(dirname "${ITEM}")/output"; [ -d "${OUT_DIR}" ] || mkdir "${OUT_DIR}"
 OUT_FILE="$(basename "${ITEM}" .gif)"
 sips -s format pdf "${ITEM}" --out "${OUT_DIR}/${OUT_FILE}.pdf"
done



All times are GMT -5. The time now is 12:23 AM.