Does dialog box works on all kind of shells? I am using korn shell in Linux .
For me dialog is not working is there any particular syntax or do we need to have particular OS version or shell env?
Code:
#!/bin/ksh
dialog --title "create file" \
--backtitle "shell script practice" \
--yesno "Are you sure you want to create \"/tmp/test.txt\"?" 7 60
# Get exit status
# 0 means user hit [yes] button.
# 1 means user hit [no] button.
# 255 means user hit [Esc] key.
response=$?
case $response in
0) echo "File created.";;
1) echo "File not reated.";;
255) echo "[ESC] key pressed.";;
esac
Hi, being very new to Korn Shell Scripting I am hoping that someone here can help me. I want to compare file name in scp/inbox directory to file name stored inside a file in pnt/compare directory.
Hi, being very new to Korn Shell Scripting I am hoping that someone here can help me. I want to... (1 Reply)
Hi
I'm new to scripting and I don't know where to start. I need to create a script that needs to look for specific files in a specific folder then I need to return the filename, the recordcount, bytecount and checksums. Then I need to write these results into a new file.
I would appreciate... (2 Replies)
Hello All,
Can someone help me to set a user's password from the script using korn shell. The password change is a one time password after user account creation.
I tried providing the input file as the value for password field but password change requires tty so my password from an input file... (3 Replies)
I have made the following simple script:
a=0
let a=$a+1
if "]
then mailx -s "Up" abc@yahoo.com
fi
When I run the above script, I get the following error:
# ./new.ksh
./new.ksh: ]: not found.
Please tell me how to use if here? (6 Replies)
I am attempting to learn shell programming using o'rielly book "Learning the Korn Shell".
I am finding it pretty difficult to do since the only access I have to unix boxes are running version 99 of ksh.
The book utilizes ksh93 and there appear to be many differences. I can't even follow along... (2 Replies)
Hi all,
I am working with debconf file for packaging the projects. I have used the
". /usr/share/debconf/confmodule" file to do the packaging in debian standard. It worked fine. When ever I am installing the package in apt-get the dialogs are come as I mentioned in the templates file.... (0 Replies)
I have a scenario to implement in Korn shell script. Here it is..
I need to compare two values to see whether they are same or not. The issue is that the values coming in for comparison can be a string or an integer which can be determined during run time only.
Which korn shell comparison... (2 Replies)
Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted!
1. The problem statement, all variables and given/known data:
There is a menu driven program and there are some fields to be achived
3. Display contents of all .lst files... (3 Replies)
I know, I can run dialog command in my machine. But what I want to do is I wanna show the dialog box to some other Remote host.
I connected to the remote system and used dialog command its shows the box in my terminal only. How can I display to that remote machine?? Any suggestions??? (3 Replies)
Discussion started by: Adhi
3 Replies
LEARN ABOUT SUSE
tk::dialog
Dialog(3) User Contributed Perl Documentation Dialog(3)NAME
Tk::Dialog - Create modal dialog and wait for a response.
SYNOPSIS
$dialog = $parent->Dialog(-option => value, ... );
DESCRIPTION
This procedure is part of the Tk script library - its arguments describe a dialog box. After creating a dialog box, Dialog waits for the
user to select one of the Buttons either by clicking on the Button with the mouse or by typing return to invoke the default Button (if
any). Then it returns the text string of the selected Button.
While waiting for the user to respond, Dialog sets a local grab. This prevents the user from interacting with the application in any way
except to invoke the dialog box. See the Show() method.
OPTIONS
The following option/value pairs are supported:
-title
Text to appear in the window manager's title bar for the dialog.
-text
Message to appear in the top portion of the Dialog.
-bitmap
If non-empty, specifies a bitmap to display in the top portion of the Dialog, to the left of the text. If this is an empty string then
no bitmap is displayed in the Dialog.
-default_button
Text label string of the Button that displays the default ring.
-buttons
A reference to a list of Button label strings. Each string specifies text to display in a Button, in order from left to right.
METHODS
$answer = $dialog->Show(?-global?);
This method displays the Dialog, waits for the user's response, and stores the text string of the selected Button in $answer. If
-global is specified a global (rather than local) grab is performed.
The actual Dialog is shown using the Popup method. Any other options supplied to Show are passed to Popup, and can be used to position
the Dialog on the screen. Please read Tk::Popup for details.
ADVERTISED WIDGETS
Because Tk::Dialog is a subclass of Tk::DialogBox it inherits all the advertised subwidgets of its superclass: e.g. "B_button-text", where
'button-text' is a Button's -text value. Additionally, Tk::Dialog advertises:
message
The dialog's Label widget containing the message text.
bitmap
The dialog's Label widget containing the bitmap image.
EXAMPLE
$dialog = $mw->Dialog(-text => 'Save File?', -bitmap => 'question', -title => 'Save File Dialog', -default_button => 'Yes', -buttons =>
[qw/Yes No Cancel/);
KEYWORDS
bitmap, dialog, modal, messageBox
perl v5.12.1 2007-05-05 Dialog(3)