Passing positioning array as whiptail -- menu option
I may have asked this before, so forgive OF.
Problem:
I can pass positioning array as -- menu option to whiptail, but it does not show in the whiptail form as an array - only single (first member "lsusb" ) entry / line shows up.
Code:
Partial terminal output :
Notes:
I used two different syntaxes and neither one shows up as full array.
Since --menu requires TWO strings I just duplicated SAME entries.
The array is loaded as --menu option correctly , but does not show in menu GUI
I have created a main menu in the following way:
while true; do
echo " "
echo "Main Menu: "
echo "Please Select An Option Using The Options Provided."
echo " "
echo "1 - Search All Files"
echo " "
echo "2 - Search Individual Files"
echo " "
... (1 Reply)
I am attempting to create a shell script with the following capaciblities:
1. Listed options to choice from
2. Use to perform awk statements
3. Print a report with the awk results
My questions are
1. How do I select more than one file for option #5 and #6
2. How to I create an... (11 Replies)
How do I add the option to change the path in a menu? I have this script. The user chooses a number and had the option of doing something, looking for log files etc. There is a possibility they might want to look at a different path other than what I have given them such as... (2 Replies)
hey all,
I already installed nautilus-actions
now , I want to add "print path" script(option) to the right context menu!..
I did :
http://img853.imageshack.us/img853/6973/59818245.png
http://img847.imageshack.us/img847/8758/37217230.png
the script print located in... (2 Replies)
Hi all
Only learning so if any mistakes, let me know
I am trying to create a menu box with Whiptail, taking in the variables from a txt.file called Name.txt which has just 4 names listed for now, one below each other..ie
Dave
John
Mike
Mary
Bash script is below and calls the txt... (8 Replies)
I have a script which uses READ to detect choice of menu option...now I want to change the script without doing whole rewrite such that when user runs ./script.sh 5 it would execute menu option 5 rather than user running ./script.sh waiting for it to load and then pressing "5 enter"
Is it... (1 Reply)
Hello,
Been trying to build a menu with whiptail lately. However, my code doesn't seems to be working even though when i compared to other similar code they looks the same.
#!/bin/bash
clear
whiptail --msgbox "Entering networking sub-menu" 20 78
whiptail --title Networking --menu... (8 Replies)
Here is my script for the menu options.
# Bash Menu Script Example
PS3='Please enter your choice: '
options=("Option 1:" "Option 2:" "Other Reason:" "Quit")
select opt in "${options}"
do
case $opt in
"Option 1 :")
echo "you chose choice 1"
;;
... (3 Replies)
As a result of whiptail menu option I am getting a data from a file.
Naturally it is output to terminal as stdour.
I like to redirect the output back to the menu.
It can be done with single input of line of text , see attached.
I just cannot see where or how the sample... (0 Replies)
i need to add 2 string variables into a positioning array , repeatedly - in loop.
First string in $2, second to $3 then up to the desired count incrementing the "position".
Using set -- alone does not increment the count so I end up with 2 variables in the array.
How do I increment the... (7 Replies)
Discussion started by: annacreek
7 Replies
LEARN ABOUT DEBIAN
prophet::cli::command
Prophet::CLI::Command(3pm) User Contributed Perl Documentation Prophet::CLI::Command(3pm)
Registering argument translations
This is the Prophet CLI's way of supporting short forms for arguments, e.g. you want to let '-v' be able to used for the same purpose as
'--verbose' without dirtying your code checking both or manually setting them if they exist. We want it to be as easy as possible to have
short commands.
To use, have your command subclass do:
sub ARG_TRANSLATIONS { shift->SUPER::ARG_TRANSLATIONS(), f => 'file' };
You can register as many translations at a time as you want. The arguments will be translated when the command object is instantiated. If
an arg already exists in the arg translation table, it is overwritten with the new value.
require_uuid
Checks to make sure the uuid attribute is set. Prints an error and dies with the command's usage string if it is not set.
edit_text [text] -> text
Filters the given text through the user's $EDITOR using Proc::InvokeEditor.
edit_hash hash => hashref, ordering => arrayref
Filters the hash through the user's $EDITOR using Proc::InvokeEditor.
No validation is done on the input or output.
If the optional ordering argument is specified, hash keys will be presented in that order (with unspecified elements following) for edit.
If the record class for the current type defines a "immutable_props" routine, those props will not be presented for editing.
False values are not returned unless a prop is removed from the output.
edit_props arg => str, defaults => hashref, ordering => arrayref
Returns a hashref of the command's props mixed in with any default props. If the "arg" argument is specified, (default "edit", use "undef"
if you only want default arguments), then "edit_hash" is invoked on the property list.
If the "ordering" argument is specified, properties will be presented in that order (with unspecified props following) if filtered through
"edit_hash".
prompt_choices question
Asks user the question and returns 0 if answer was the second choice, 1 otherwise. (First choice is the default.)
prompt_Yn question
Asks user the question and returns true if answer was positive or false otherwise. Default answer is 'Yes' (returns true).
print_usage
Print the command's usage message to STDERR and die. Commands should implement "usage_msg", which returns the usage message.
If the usage message method needs arguments passed in, use a closure.
get_cmd_and_subcmd_names [no_type => 1]
Gets the name of the script that was run and the primary commands that were specified on the command-line. If a true boolean is passed in
as "no_type", won't add '<record-type>' to the subcmd if no type was passed in via the primary commands.
perl v5.10.1 2009-08-19 Prophet::CLI::Command(3pm)