Sponsored Content
Full Discussion: Bash menu not running
Top Forums Programming Open Source Bash menu not running Post 302939680 by RudiC on Friday 27th of March 2015 03:20:05 PM
Old 03-27-2015
Exactly that line - how many opening parentheses and how many closing?
This User Gave Thanks to RudiC For This Post:
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Presenting the user a menu in Bash ...

Hello, I am trying to write a bash script function to present the user a menu of options. The following is what I have so far: function MainMenu { while ] do echo "--------------------------------------------------------------------------------" echo... (4 Replies)
Discussion started by: ckoeber
4 Replies

2. Shell Programming and Scripting

Bash menu script

I have a main menu quit=n while do clear echo echo "1. General system information" echo "2. Hardware utilisation information" echo "3. File management" echo "4. User information" echo "5. Information on network connectivity" echo "6. Information on processes" echo "Q.Quit" ... (3 Replies)
Discussion started by: AngelFlesh
3 Replies

3. Shell Programming and Scripting

Help regarding a bash menu script

Greetings all, I'm having some trouble writing a menu drive bash script, actually coding the menu part was not difficult however its a problem with a menu option I'm having trouble with. My menu has 5 options, when the user selects the second option, they are then prompted to enter a number from... (5 Replies)
Discussion started by: Vitrophyre
5 Replies

4. Shell Programming and Scripting

get chosen value from bash menu

Hi again :) This is just a sample whiptail menu. Works great, but have been trying to get the chosen value into a variable but failing pretty bad...its ther but unsure how to echo it out when needed #! /bin/bash #This is the menu whiptail --title "Menu example" --menu "Choose an... (9 Replies)
Discussion started by: olearydc
9 Replies

5. UNIX for Dummies Questions & Answers

Simple bash script menu

Dear Sir, May I know how do I go about adding the following feature into the script below: When user enter values other than 1,2,3,4, a) Message “Wrong entry !!! Pls select 1,2,3 or 4” is displayed b) The screen is cleared again and the menu is displayed. #!/bin/bash clear var=1... (2 Replies)
Discussion started by: fusetrips
2 Replies

6. Red Hat

Bash: menu-complete and reverse

Hi, In the archives I found this: And this works fine. $if mode=vi "\C-0-": digit-argument TAB: menu-complete "\e But what I want is to reverse this. So I want that tab does reverse menu completion and shift tab does normal menu completion. Can anyone help me with this? Thanks (0 Replies)
Discussion started by: ozkanb
0 Replies

7. 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

8. Shell Programming and Scripting

Bash menu opens and closes

Ever since I added these two code blocks to my bash menu it just opens and closes right away. I use a batch file that worked fine until these codes were added and I am not sure what is wrong. Basically, what I am trying to do in the additional section is if the answer is "Y" then it goes back... (13 Replies)
Discussion started by: cmccabe
13 Replies

9. Shell Programming and Scripting

Bash menu item counter

We have a simple menu with prompt of menu numbers to user. It is still under construction. Is there a way to "count" the menu choices so the prompt maximum count can be changed dynamically? See attached TODO note in code read_options(){ local choice # the... (7 Replies)
Discussion started by: annacreek
7 Replies

10. Shell Programming and Scripting

Bash Menu using zenity

Hi, I'm new to bash, and have an example menu script using Zenity. It works fine if the user enters A B or C, but if the user enters nothing, I can only figure out how to exit the script. How do I get the menu to reappear if no input is selected? The script is: title="Select example"... (2 Replies)
Discussion started by: allen11
2 Replies
ENDPROTOENT(P)						     POSIX Programmer's Manual						    ENDPROTOENT(P)

NAME
endprotoent, getprotobyname, getprotobynumber, getprotoent, setprotoent - network protocol database functions SYNOPSIS
#include <netdb.h> void endprotoent(void); struct protoent *getprotobyname(const char *name); struct protoent *getprotobynumber(int proto); struct protoent *getprotoent(void); void setprotoent(int stayopen); DESCRIPTION
These functions shall retrieve information about protocols. This information is considered to be stored in a database that can be accessed sequentially or randomly. The implementation of this database is unspecified. The setprotoent() function shall open a connection to the database, and set the next entry to the first entry. If the stayopen argument is non-zero, the connection to the network protocol database shall not be closed after each call to getprotoent() (either directly, or indi- rectly through one of the other getproto*() functions), and the implementation may maintain an open file descriptor for the database. The getprotobyname() function shall search the database from the beginning and find the first entry for which the protocol name specified by name matches the p_name member, opening and closing a connection to the database as necessary. The getprotobynumber() function shall search the database from the beginning and find the first entry for which the protocol number speci- fied by proto matches the p_proto member, opening and closing a connection to the database as necessary. The getprotoent() function shall read the next entry of the database, opening and closing a connection to the database as necessary. The getprotobyname(), getprotobynumber(), and getprotoent() functions shall each return a pointer to a protoent structure, the members of which shall contain the fields of an entry in the network protocol database. The endprotoent() function shall close the connection to the database, releasing any open file descriptor. These functions need not be reentrant. A function that is not required to be reentrant is not required to be thread-safe. RETURN VALUE
Upon successful completion, getprotobyname(), getprotobynumber(), and getprotoent() return a pointer to a protoent structure if the requested entry was found, and a null pointer if the end of the database was reached or the requested entry was not found. Otherwise, a null pointer is returned. ERRORS
No errors are defined. The following sections are informative. EXAMPLES
None. APPLICATION USAGE
The getprotobyname(), getprotobynumber(), and getprotoent() functions may return pointers to static data, which may be overwritten by sub- sequent calls to any of these functions. RATIONALE
None. FUTURE DIRECTIONS
None. SEE ALSO
The Base Definitions volume of IEEE Std 1003.1-2001, <netdb.h> COPYRIGHT
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1, 2003 Edition, Standard for Information Technol- ogy -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 6, Copyright (C) 2001-2003 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html . IEEE
/The Open Group 2003 ENDPROTOENT(P)
All times are GMT -4. The time now is 06:58 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy