[TriLUG] HOWTO: Create PDFs using Samba but not CUPS

Alan Porter porter at trilug.org
Mon Feb 27 16:58:34 EST 2006


David McDowell said the following:

>Ok, the relationship between %U abnd $2 makes sense now.  I changed
>the _ to - and now I have filenames:  -Feb27-160509.pdf  so the _ was
>part of it, but I'm still not getting a username value.
>


Variable names in bash can have underscores in them, so
you need to do something like this to draw the line between
the variable name and your delimiters.

filename=${user}_${date}_${whatever}

This trick is useful if you are using a delimiter like "x".
Otherwise, how would bash know that the x's are not part
of the variable names?  filename=$userx$datex$whatever
will not work, filename=${user}x${date}x${whatever} will.


Alan




.






More information about the TriLUG mailing list