File prindi.sh contains
/usr/bin/lpr –P SL-M3325ND <teade.pdf
its inovoking returns error
/usr/bin/lpr: Error - unable to access "–P" - No such file or directory
If this command in invoked directly from command line it works:
# /usr/bin/lpr -P SL-M3325ND <teade.pdf
# lpq
SL-M3325ND is ready
no entries
How to fix this so that it can printed from prindi.sh also ?
-
sign in your script. Replace it with a good old-fashioned hyphen, andlpr
will stop seeing–P
as a (missing) file to be printed, and recognise-P
as a flag (do you see they're different lengths?).