10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi experts,
I am using KSH and I am need to display file with number in front of file names and user can select it by entering the number.
I am trying to use following command to display list with numbers. but I do not know how to capture number and identify what file it is to be used for... (5 Replies)
Discussion started by: mysocks
5 Replies
2. UNIX for Dummies Questions & Answers
Hello,
May i please know how do i check if the given input argument is one of the listed numbers then success else failure. I am using bash shell.
if
then
echo "success"
else
echo "failure"
fi
Thank you. (2 Replies)
Discussion started by: Ariean
2 Replies
3. Shell Programming and Scripting
Hello guys,
I am trying to create simple script which will show user GUI and redirect him to folder which he will chose based on his action, the folder is variable which has to be selected by user, the rest of the script updates/copies/removes values in that folder.
it is quite simple to... (2 Replies)
Discussion started by: defila
2 Replies
4. UNIX for Dummies Questions & Answers
Hi, I am trying to determine the encoding for the file, because to convert to UTF-8, it seems as though I have to know the encoding of the source.
Tried this
file <filename>
give me this:
<filename>:data or International Language text
Tried to see the locale and this is the output:... (6 Replies)
Discussion started by: MIA651
6 Replies
5. HP-UX
Hi Experts,
Need your advise in determining the size of swap space in of the new HP-Ux server.
Server is having 32G of physical memory.
Ideally what amout of physical memory should be allocated as a swap space?
Following document from HP suggests to have minimum swap space... (2 Replies)
Discussion started by: sai_2507
2 Replies
6. Shell Programming and Scripting
Hey,
I am trying to check if an integer is even in a tcsh script
This is what I am running now
set lattest = ` echo $latmin "%2" | bc -l `
echo $lattest
if ( $lattest == 0 ) then
echo "min is already even"
else if ( $lattest =! 0 ) then
set latmin = ` echo $latmin "+1" |... (2 Replies)
Discussion started by: travish12
2 Replies
7. Shell Programming and Scripting
Hi,
I have a file with data as given
$cat file1.txt
123
234
23e
234.456
234.876e
345.00
I am checking if the values are proper integers using the command.
nawk -F'|' 'int($1)!=$1 {printf "Error in field 1|"$0"\n"}' file1.txt
This is checking for only integers ( without... (10 Replies)
Discussion started by: ashwin3086
10 Replies
8. Shell Programming and Scripting
Hi,
I have one file like 00123. And this file name is generated as a sequence.
So how can I confirm the generated file name is a number, not a special character or alphabets.
Can anybody help me out.
Thanks in advance. (3 Replies)
Discussion started by: Kattoor
3 Replies
9. Shell Programming and Scripting
Hi,
In my Shell Script i am counting the duplicate IPs in LAN,...After counting i have to show in checklist in zenity which one to delete from the LAN........so initially i dont know no. of duplicate IPs in the LAN....Hence i can determine how many check list needed.....
Duplicate IPs... (3 Replies)
Discussion started by: shivarajM
3 Replies
10. Shell Programming and Scripting
Hi ,
I am facing a problem .. which looks simple... but took 2 days of mine.. even now it is not solved completely..
I have one variable..., want to know whether that variable contains number... canbe +ve or -ve ...
Values
+35 --- number
-43 --- number
45A -- non number... (12 Replies)
Discussion started by: shihabvk
12 Replies
zenity(1) User Commands zenity(1)
NAME
zenity, gdialog - display simple GNOME dialogs
SYNOPSIS
zenity --calendar [--height=height] [--title=title] [--width=width] [--window-icon=path] [--date-format=format] [--day=number]
[--month=number] [--text=text] [--year=number]
zenity --entry [--height=height] [--title=title] [--width=width] [--window-icon=path] [--entry-text=text] [--hide-text] [--text=text]
zenity --error | --info | --question | --warning [--height=height] [--title=title] [--width=width] [--window-icon=path] [--text=text]
zenity --file-selection [--height=height] [--title=title] [--width=width] [--window-icon=path] [--filename=path] [--multiple] [--separa-
tor=character]
zenity --list --column=text [--height=height] [--title=title] [--width=width] [--window-icon=path] [--checklist] [--editable] [--radiolist]
[--separator=character]
zenity --progress [--height=height] [--title=title] [--width=width] [--window-icon=path] [--auto-close] [--percentage=number] [--pulsate]
[--text=text]
zenity --text-info [--height=height] [--title=title] [--width=width] [--window-icon=path] [--editable] [--filename=path]
zenity --about | --help | --usage | --version | -GTK+_options
DESCRIPTION
The Zenity application displays simple GNOME dialogs. You can use Zenity to create scripts that interact graphically with the user. gdia-
log(1) has been deprecated and is now a wrapper script around Zenity, and will preserve compatibility with older scripts.
OPTIONS
Zenity supports several different types of options.
Zenity-Specific Options
The following Zenity-specific options are supported:
--about Display the About Zenity dialog, which provides information about the Zenity application, including the version
number and the author.
--version Display the version number of Zenity.
Help Options
The following help options are supported:
--help Display help text. You can also use -? to specify this option.
--usage Display brief usage text.
GTK+ Options
Zenity supports the standard GTK+ options. For more information about the GTK+ options, execute the zenity -? command.
Dialog Options
The following dialog options are supported:
--calendar Display a calendar dialog.
--entry Display a text entry dialog.
--error Display an error dialog.
--file-selection Display a file-selection dialog.
--info Display an informational dialog.
--list Display a list dialog.
--progress Display a progress indication dialog.
--question Display a question dialog.
--text-info Display a text information dialog.
--warning Display a warning dialog.
General Dialog Options
The following general dialog options are supported:
--height=height Set the dialog height.
--title=title Set the dialog title.
--width=width Set the dialog width.
--window-icon=path Set the dialog window icon with a full path to an image.
Calendar Dialog Options
The following calendar dialog options are supported:
--date-format=format Set the date format to return at the command line. The default format depends on your locale. The format must be of
strftime style, for example %A %d/%m/%y.
--day=number Set the calendar day.
--month=number Set the calendar month.
--text=text Set the dialog text.
--year=number Set the calendar year.
Text-Entry Dialog Options
The following text-entry dialog options are supported:
--entry-text=text Set the dialog entry text.
--hide-text Use asterisks to hide the entry text.
--text=text Set the dialog text.
Error Dialog Options
The following error dialog options are supported:
--text=text Set the dialog text.
File-Selection Dialog Options
The following file-selection dialog options are supported:
--filename=path Set the file or directory to select by default.
--multiple Allow multiple selections.
--separator=character Set the separator character to return at the command line. This option is used only when the dialog allows multi-
ple selections.
Informational Dialog Options
The following informational dialog options are supported:
--text=text Set the dialog text.
List Dialog Options
The following list dialog options are supported:
--checklist Specify that the first column contains check boxes.
--column=text Set the text of a column.
--editable Specify that the dialog contents are editable.
--radiolist Specify that the first column contains radio buttons.
--separator=character Set the separator character to return at the command line. This option is used only when the dialog allows multi-
ple selections.
Progress-Indication Dialog Options
The following progress-indication dialog options are supported:
--auto-close Close the dialog automatically when 100% has been reached.
--percentage=number Set the initial percentage of the progress bar.
--pulsate Specify that the progress bar pulsates until an EOF character is read from the command line.
--text=text Set the dialog text.
Question Dialog Options
The following question dialog options are supported:
--text=text Set the dialog text.
Text-Informational Dialog Options
The following text-informational dialog options are supported:
--editable Specify that the dialog contents are editable.
--filename=path Set the file to display in the dialog.
Warning Dialog Options
The following warning dialog options are supported:
--text=text Set the dialog text.
EXAMPLES
Example 1: Launching Zenity Using the List Dialog
example% zenity --list --title="Choose bugs you wish to view"
--text="Select items from the list below."
--column="Bug Number" --column="Severity" --column="Description"
992383 Normal "GtkTreeView crashes on multiple selections"
293823 High "GNOME Dictionary does not handle proxy"
393823 Critical "Menu editing does not work in GNOME 2.0"
Example 2: Launching Zenity Using the Progress Dialog
example% find . -name '*.bk' | zenity --progress
--title="Finding backups" --pulsate
Example 3: Launching Zenity Using the Text Informational Dialog
example% zenity --text-info --title="LGPL License"
--filename="/home/user1/LICENSE"
ENVIRONMENT VARIABLES
The following environment variables affect the execution of zenity:
ZENITY_OK, DIALOG_OK Set the return value for OK.
ZENITY_CANCEL, DIALOG_CANCEL Set the return value for Cancel.
ZENITY_ERROR, DIALOG_ERROR Set the return value for Error.
ZENITY_ESC, DIALOG_ESC Set the return value for Escape.
EXIT STATUS
The following exit values are returned:
-1 Error
0 OK
1 Cancel, Escape
FILES
The following files are used by this application:
/usr/bin/zenity Executable for Zenity.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWzenity |
+-----------------------------+-----------------------------+
|Interface stability |External |
+-----------------------------+-----------------------------+
SEE ALSO
Zenity Manual
Latest version of the GNOME Desktop User Guide for your platform.
NOTES
Written by Glynn Foster, Sun Microsystems Inc., 2003, 2004.
SunOS 5.10 20 Jul 2004 zenity(1)