...
Блок кода | ||
---|---|---|
| ||
OWNER=`$LPATTR $ID job-originating-user-name 2>/dev/null | cut -f2 -d=` |
на
Блок кода |
---|
OWNER=`$LPATTR $ID job-originating-user-name 2>/dev/null | cut -f2 -d= | awk -F"@" '{print $1}'` |
и
Блок кода |
---|
MACOWNER=`$LPATTR $ID mac-job-user-name 2>/dev/null | cut -f2 -d=` |
на
Блок кода |
---|
MACOWNER=`$LPATTR $ID mac-job-user-name 2>/dev/null | cut -f2 -d= | awk -F"@" '{print $1}'` |
Должно получится так:
Блок кода |
---|
OWNER=`$LPATTR $ID job-originating-user-name 2>/dev/null | cut -f2 -d= | awk -F"@" '{print $1}'`
if [ "x$OWNER" == "x" ]; then
error "No job-originating-user-name in job ($ID). You not in lpmac group or Parsec policy not selected."
exit 1
fi
MACOWNER=`$LPATTR $ID mac-job-user-name 2>/dev/null | cut -f2 -d= | awk -F"@" '{print $1}'`
if [ "x$MACOWNER" == "x" ]; then
error "No mac-job-user-name in job ($ID)."
exit 1
fi |