LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 03-06-2018, 03:08 PM   #1
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Rep: Reputation: 144Reputation: 144
Question dialog --dselect bug?


hi all, I am writing a simple scipt application, and when I call dialog --dselect $DIRPATH 17 70 2>TMP
it appears to work, but if I use the arrow keys to move to the directory window and press enter, instead of exiting, passing the selected item, text imput goes to the bottom of the screen, and until I press Ctl-D or Ctl-C is stuck.
the exact test code is below.
Code:
dialog --colors --title "\Z4qvc\Zn" --dselect "$IMAGEDIR" 10 70 2>$TMP && {
if [ -e $TMP ]; then
  echo "`cat $MTP` returned"
  exit 2
else
  echo "nothing returned"
  exit 2
fi
}
echo "dialog errored with $?"
exit 2
where the IMAGEDIR variable is already set, as is the TMP variable.
any clues as to what I'm doing wrong - or is there a bug?
I should say that other uses of dialog in the script are working just fine ( --menu , --yesno --msgbox --radiolist and --checklist )
thanks
 
Old 03-06-2018, 05:17 PM   #2
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Line #3, replace $MTP by $TMP.

That's not a bug, just a typo: cat is stuck waiting for an argument or an input.

Quoting "man cat":
Code:
NAME
       cat - concatenate files and print on the standard output

SYNOPSIS
       cat [OPTION]... [FILE]...

DESCRIPTION
       Concatenate FILE(s) to standard output.

       With no FILE, or when FILE is -, read standard input.
PS. Paraphrasing the old saying: "there's more than one way to skin kill a cat": one of them is pressing Ctrl+C

Last edited by Didier Spaier; 03-06-2018 at 05:27 PM.
 
Old 03-07-2018, 03:49 AM   #3
timsoft
Member
 
Registered: Oct 2004
Location: scotland
Distribution: slackware 15.0 64bit, 14.2 64 and 32bit and arm, ubuntu and rasbian
Posts: 495

Original Poster
Rep: Reputation: 144Reputation: 144
thanks so much didier. I've been staring at that for hours and hadn't spotted my typo. it's working now.
 
  


Reply

Tags
dialog, dselect, sh



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Dialog -returning to a previous dialog ArneVanP Linux - Newbie 5 12-28-2017 03:10 AM
a bug in dialog merged with Slackware64 current? duturo1953 Slackware 1 08-23-2017 02:26 PM
Reproducing Alt-F2 run dialog effect (focus dialog box, dim and disable rest of desktop) in LinuxMint Cinnamon in other applications. kevin77v Linux - Desktop 0 01-20-2016 12:44 PM
Bug in dialog utility on Slackware tree dslackw Slackware 5 09-01-2015 01:53 AM
dselect rvijay Debian 4 02-21-2005 08:05 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 05:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration