Sponsored Content
Full Discussion: Troubleshooting whiptail
Top Forums Shell Programming and Scripting Troubleshooting whiptail Post 303021564 by Chubler_XL on Sunday 12th of August 2018 11:48:18 PM
Old 08-13-2018
on line 104 you are reading the contents of file results and whiptail output is being re-directed to file choices.

Note that this file name will cause issues if you have 2 processes running the script at the same time. Can I suggest you use /tmp to store the output file and give it a unique name eg using $$ for the process ID eg:


Code:
whiptail \
    --title "checklist test Option 1"  \
    --separate-output \
    --checklist "Choose: " 20 78 3 \
    "John" "" on  \
    "Glen" "" off  \
    "Adam" "" off 2> /tmp/wtout_$$

while read choice
do
    case $choice in
        John)
...
   esac
done < /tmp/wtout_$$

# clean up temp file
rm /tmp_wtout_$$

 

10 More Discussions You Might Find Interesting

1. Solaris

help troubleshooting

Hi. I have a Solaris 10 server that's taking about 20secs to respond to telnet or ftp commands. Has anyone ever seen something like that? Can you tell me where to start troubleshooting please? I logged in and did a prtstat, but nothing is jumping out as an issue. (8 Replies)
Discussion started by: bbbngowc
8 Replies

2. Red Hat

whiptail --password : How does it work?

I have a question regarding "whiptail utility" in Linux. I have the following whiptail command within a script: #!/bin/sh whiptail --passwordbox " Password " 10 40 I would like to know Where does it store the password when the script is run? Does it go to any particular file? How... (1 Reply)
Discussion started by: Vabiosis
1 Replies

3. Shell Programming and Scripting

Questions: whiptail --passwordbox

I have a question regarding "whiptail utility" in Linux. I have the following whiptail command within a script: #!/bin/sh whiptail --passwordbox " Password " 10 40 I would like to know Where does it store the password when the script is run? Does it go to any particular file? How... (1 Reply)
Discussion started by: Vabiosis
1 Replies

4. IP Networking

TCP/IP troubleshooting

Hello all, Can somebody please tell what is the best book out there that can help me learn TCP troubleshooting and understaning the TCP options like window scaling, large receive offload? I would like to understand how all the TCP tuning parameters function. Is there a book out there that can... (4 Replies)
Discussion started by: Pouchie1
4 Replies

5. Shell Programming and Scripting

Whiptail menu, getting back the variable

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)
Discussion started by: olearydc
8 Replies

6. Shell Programming and Scripting

Bash Script - Whiptail Menu Help!

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)
Discussion started by: malfolozy
8 Replies

7. Shell Programming and Scripting

Whiptail "Command not found"

Evening, I'd like to point out I am very much new to anything regarding scripting, so I apologize If I am / will ask stupid questions. I am currently trying to design a script that will completely setup a server for a group that needs one, so that they can have a easy way of getting up and... (8 Replies)
Discussion started by: KeyXMakerX
8 Replies

8. Shell Programming and Scripting

Redirecting stdout output to whiptail menu box

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)
Discussion started by: annacreek
0 Replies

9. Shell Programming and Scripting

Use positional parameters in loop / while syntax in whiptail

I like to “optimize” / make more like a real program my bash script by replacing repetitious code which utilizes positional parameters. I am having two issues I cannot solve and would appreciate some assistance with resolving them. a) how to modify the whiptail checklist... (3 Replies)
Discussion started by: annacreek
3 Replies

10. Shell Programming and Scripting

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: DynamicEntry=$(whiptail \ --title "DEBUG... (1 Reply)
Discussion started by: annacreek
1 Replies
set_color(1)							       fish							      set_color(1)

NAME
set_color - set_color - set the terminal color set_color - set the terminal color Synopsis set_color [-v --version] [-h --help] [-b --background COLOR] [COLOR] Description Change the foreground and/or background color of the terminal. COLOR is one of black, red, green, brown, yellow, blue, magenta, purple, cyan, white and normal. o -b, --background Set the background color o -c, --print-colors Prints a list of all valid color names o -h, --help Display help message and exit o -o, --bold Set bold or extra bright mode o -u, --underline Set underlined mode o -v, --version Display version and exit Calling set_color normal will set the terminal color to whatever is the default color of the terminal. Some terminals use the --bold escape sequence to switch to a brighter color set. On such terminals, set_color white will result in a grey font color, while set_color --bold white will result in a white font color. Not all terminal emulators support all these features. This is not a bug in set_color but a missing feature in the terminal emulator. set_color uses the terminfo database to look up how to change terminal colors on whatever terminal is in use. Some systems have old and incomplete terminfo databases, and may lack color information for terminals that support it. Download and install the latest version of ncurses and recompile fish against it in order to fix this issue. Version 1.23.1 Sun Jan 8 2012 set_color(1)
All times are GMT -4. The time now is 06:38 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy