
On 06.06.13 10:19, Tim Connors wrote:
On Wed, 5 Jun 2013, Erik Christiansen wrote:
On 04.06.13 23:45, Craig Sanders wrote:
spaces in filenames, OTOH, are quite common. especially if you have to deal with files uploaded by Mac or Windows users.
Although it's mostly xpdf which won't handle spaces in filenames,
Eh? WFM.
Ah, you're having trouble understanding it. That's OK, just learn from what follows, and you'll catch up.
I'm finding a simple alias useful for the few arriving here:
alias unspace="/usr/bin/rename 's/ /_/g' "
Isn't it easier just to fix your scripts (and evidentally your alias for xpdf) and program defensively?
Hopefully it'll be easier for you to understand if you fantasise less, and instead observe reality: $ cp Desktop/h-bridge_sch_pcb.pdf /tmp/h-bridge\ sch\ pcb.pdf $ /usr/bin/xpdf /tmp/h-bridge\ sch\ pcb.pdf Error: Couldn't open file '/tmp/h-bridge sch pcb.pdf' Just in case there's been a recent fix, I did an apt-get install, but there's no improvement in the behaviour of the package. I see now, that some time ago I implemented this fix: $ which xpdf xpdf is a function xpdf () { if [[ $1 =~ ' ' ]]; then fn=${1// /_}; mv "$1" $fn; else fn=$1; fi; /usr/bin/xpdf -geometry 1200x900+5+0 -z width -papercolor slategrey $fn & } so the rename example I posted as part of a wider discussion isn't needed here for this case. Hopefully you understand better now. Erik P.S. It appears that /usr/bin/xpdf, provided by the xpdf package, is in fact a wrapper, so I could merge my function with that, but then it would be overwritten on the next upgrade. Maybe I'll download the version 3.03 source from foolabs one day, to see what it offers, but it'll soon be time to upgrade my ubuntu LTS version, so it's better to suffer all the pain in one annoying session. -- The only thing to do with good advice is pass it on. It is never any use to oneself. - Oscar Wilde