On Fri, Apr 25, 2025 at 12:51 PM Greg Wooledge wrote: > > On Fri, Apr 25, 2025 at 11:33:54 -0400, Lee wrote: > > > Also, you should quote "$tempf". > > > > > > [ -s "$tempf" ] && notify-send ... > > > > is there any way that > > $(mktemp -q --tmpdir=/tmp -t updXXXXX) > > would return a 0 status and a filename with embedded spaces .. or with > > anything that would require quoting? > > The mktemp(1) man page doesn't document which characters can be used > to replace the X's. > > The info page does. It says "alpha-numeric characters". > > So, you *might* be safe, if the info page is telling the truth, and if > no future version of the mktemp program changes the behavior. > > But why take the chance?
You're right - I should be working on the habit of putting quotes around filename vars. Always. I wanted to know if what I did was wrong or just not as correct as it could be. So in this case, it seems like not perfect but not wrong either :) Thanks Lee