|
@@ -17,14 +17,14 @@ fi
|
|
|
|
|
|
FILE=$1
|
|
|
shift
|
|
|
-BASE_FILE_NAME=$(basename ${FILE})
|
|
|
+BASE_FILE_NAME=$(basename "${FILE}" | tr ' ()' '___')
|
|
|
|
|
|
if [ ! -e "$FILE" ] ; then
|
|
|
echo "$FILE does not exist." >&2
|
|
|
exit 1
|
|
|
fi
|
|
|
|
|
|
-scp ${FILE} "${REMOTE_PRINT_HOST}:${REMOTE_PRINT_PATH}${BASE_FILE_NAME}"
|
|
|
+scp "${FILE}" "${REMOTE_PRINT_HOST}:${REMOTE_PRINT_PATH}${BASE_FILE_NAME}"
|
|
|
|
|
|
if [ $? -eq 0 ] ; then
|
|
|
ssh "$REMOTE_PRINT_HOST" -t "lp $@ ${REMOTE_PRINT_PATH}${BASE_FILE_NAME}"
|