shell script: how to insert a command into quotes
hello!
I'm running this command Code:
convert -format jpg "$i" "/Volumes/TESTHD/JPEG/$i.jpg" the problem is, it produces files with double extension (.tif.jpg). to avoid this, I'd like to use something like basename $i, but I don't know hot to put it inside the quotes. i tried Code:
convert -format jpg "$i" "/Volumes/TESTHD/JPEG/basename $i.jpg" |
Try something like this:
Code:
convert -format jpg "$i" "/Volumes/TESTHD/JPEG/`echo ${i}|cut -d. -f1`.jpg" |
thank you! super-fast answer
I'll give it a try. I (almost) understand what it does, but why do you need {}? |
Hi,
Not so fast answer ;) The '{}' is only to make sure the variable is clearly defined. Just something I tend to always do. It avoids problems like Code:
#!/bin/bash |
got it!
I meant: thank you for your answer, you answered in a really short time in my opinion. ;) sorry for my poor english. thank you, again! |
All times are GMT -5. The time now is 09:50 PM. |