slackpkg - version 15.0.2; post-functions.sh: line 182: [: 41: unary operator expected & more screen control garbage .
by babydr from LinuxQuestions.org on (#5HHTM)
Hello ALL , Here we go again (I beleive , Maybe the previous culprit was from the "upgrade-all" area ).
This line in my script (Yes run from CRON) ...
slackpkg -batch=on -default_answer=y install-new
Why should the below be output when run from a script ?
Being Run from cron I thought we had this nuked a couple of months ago ?
Code:Installing package libgnt-2.14.1-x86_64-1.txz:
PACKAGE DESCRIPTION:
# libgnt (The GLib Ncurses Toolkit)
#
# GNT is an ncurses toolkit for creating text-mode graphical user
# interfaces in a fast and easy way. It is based on GLib and ncurses.
# It was born out of the console-based UI, Finch, for the libpurple
# project, but has now been split into its own independent repository.
#
# Homepage: https://keep.imfreedom.org/libgnt/libgnt
#
Executing install script for libgnt-2.14.1-x86_64-1.txz.
Package libgnt-2.14.1-x86_64-1.txz installed.
Searching for NEW configuration files...
stty: 'standard input': Inappropriate ioctl for device
Some packages had new configuration files installed (27 new files):
/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 41: unary operator expected
/etc/default/sshd.new
^[[1A^[[K^[[1A^[[K
What do you want (K/O/R/P)?
(K)eep the old files and consider .new files later
(O)verwrite all old files with the new ones. The
old files will be stored with the suffix .orig
(R)emove all .new files
(P)rompt K, O, R selection for every single fileie:
Code: 179 # No. of prompt etc. lines to print.
180 TEXTLINES=$(( $( printf %b "$PROMPTTEXT" | wc -l ) + 3 ))
181
X 182 if [ $(( newcount + TEXTLINES )) -lt $ROWS ]; then
183 # All files will fit on screen.
184 printf "%s\n" "$FILES"
185 else
186 # Won't all fit, so scroll a screenfull at a time.
187 # No. of lines minus 'Searching for' + 'Press SPACE...'
188 MAXROWS=$(( ROWS - 5 ))Tnx , ALL for looking into this . JimL
ps: @chrisretusn , This is still using the old script interation atm . Will plce it in test run at home soon . Twyl .
pps: @@allend , This is very simular to the one you patched the other day that I had reported on "2021-03-15, 17:54" . Twys .


This line in my script (Yes run from CRON) ...
slackpkg -batch=on -default_answer=y install-new
Why should the below be output when run from a script ?
Being Run from cron I thought we had this nuked a couple of months ago ?
Code:Installing package libgnt-2.14.1-x86_64-1.txz:
PACKAGE DESCRIPTION:
# libgnt (The GLib Ncurses Toolkit)
#
# GNT is an ncurses toolkit for creating text-mode graphical user
# interfaces in a fast and easy way. It is based on GLib and ncurses.
# It was born out of the console-based UI, Finch, for the libpurple
# project, but has now been split into its own independent repository.
#
# Homepage: https://keep.imfreedom.org/libgnt/libgnt
#
Executing install script for libgnt-2.14.1-x86_64-1.txz.
Package libgnt-2.14.1-x86_64-1.txz installed.
Searching for NEW configuration files...
stty: 'standard input': Inappropriate ioctl for device
Some packages had new configuration files installed (27 new files):
/usr/libexec/slackpkg/functions.d/post-functions.sh: line 182: [: 41: unary operator expected
/etc/default/sshd.new
^[[1A^[[K^[[1A^[[K
What do you want (K/O/R/P)?
(K)eep the old files and consider .new files later
(O)verwrite all old files with the new ones. The
old files will be stored with the suffix .orig
(R)emove all .new files
(P)rompt K, O, R selection for every single fileie:
Code: 179 # No. of prompt etc. lines to print.
180 TEXTLINES=$(( $( printf %b "$PROMPTTEXT" | wc -l ) + 3 ))
181
X 182 if [ $(( newcount + TEXTLINES )) -lt $ROWS ]; then
183 # All files will fit on screen.
184 printf "%s\n" "$FILES"
185 else
186 # Won't all fit, so scroll a screenfull at a time.
187 # No. of lines minus 'Searching for' + 'Press SPACE...'
188 MAXROWS=$(( ROWS - 5 ))Tnx , ALL for looking into this . JimL
ps: @chrisretusn , This is still using the old script interation atm . Will plce it in test run at home soon . Twyl .
pps: @@allend , This is very simular to the one you patched the other day that I had reported on "2021-03-15, 17:54" . Twys .