Sponsored Content
Top Forums UNIX for Dummies Questions & Answers Selectable numeric text menu from file possible? Post 302231680 by era on Wednesday 3rd of September 2008 02:04:41 AM
Old 09-03-2008
It's documented in your shell's manual page. ${var#pattern} returns $var with pattern removed from the beginning, ${var%pattern} returns $var with pattern removed from the end. The pattern can contain shell wildcards (?, [abc], *) but is otherwise just a string.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Changing korn shell script text Menu colors?

Is it possible to change the color of text in a korn shell script Menu? I can change the color of session text through my telnet client but I want to be able to change color text in the Korn shell menu to highlight certain items. (6 Replies)
Discussion started by: darthur
6 Replies

2. Programming

Selectable Id

If we want to determine that amongst many descriptors which one is set ready for reading , ready for writing or has an error condition pending we use the select () utility.I would like to know can we have some technique by which we will be able to determine which amongst many IPC ids is ready for... (0 Replies)
Discussion started by: S.P.Prasad
0 Replies

3. Shell Programming and Scripting

blink / flash echo text in a menu

I have a ksh script that is a login menu for my end users. I would like to have one line of the welcome message flash when there is a system notice about an impending outage. The welcome message is a series of echo statements which prints a text file "msg of the day" with the status msg. I tried... (1 Reply)
Discussion started by: MizzGail
1 Replies

4. Shell Programming and Scripting

Perl code to differentiate numeric and non-numeric input

Hi All, Is there any code in Perl which can differentiate between numeric and non-numeric input? (11 Replies)
Discussion started by: Raynon
11 Replies

5. Shell Programming and Scripting

conditional Testing numeric and text values problems

hi, when i type in a value higher than 20 it will show me the validation but if i put a negative figure it just goes goes blank where i just keep typing and nothing happens so i had to control c to exit out the process, can someone help me please. clear read -p "please enter... (2 Replies)
Discussion started by: bassmasta1
2 Replies

6. Shell Programming and Scripting

Perl simple text menu with options

Hopefully I'm in the right place. Im new to the forums and linux! I'm looking to add a menu to my perl hangman game i have created. The menu will use user input for the desired option and then perform the operation indicated. I would like something along the lines of: Welcome to Hangman... (1 Reply)
Discussion started by: jahburmski
1 Replies

7. Shell Programming and Scripting

Script to call a menu script and redirect each option to a text file

Hello, I want to design a script that will call an existing menu script and select options one by one and redirict the out put to a file. For example;- In the script MENU.sh there are 10 options i want to design a script MENU2.sh that will select option 2 3 4 6 7 10 and redirict the output... (4 Replies)
Discussion started by: spradha
4 Replies

8. Shell Programming and Scripting

Sum numeric columns contained in a plain text file

Hi everyone, Here are the contents of a plain text file created by a SQL query: SUM(T.TRNQTY) COUNT(D.TRNSEQ) ---------------- ---------------- 1380 46 1393 59 2680 134 740 37 ... (5 Replies)
Discussion started by: gacanepa
5 Replies

9. Programming

C++ Get text and numeric value from a string

I have a string opt="row234" I want to put "row" in a string and 234 in an int. In general it should be opt="textnum" I want to store text in a string and num in an int. (6 Replies)
Discussion started by: kristinu
6 Replies

10. Programming

Listing Option Menu Choices from Text File

Hello, I am starting up a tool and one of the initial steps is to select a site/location which is being read from a text file. Here is the text file contents: site1 site2 site3 Here is the code: #!/usr/bin/python from Tkinter import * (3 Replies)
Discussion started by: tattoostreet
3 Replies
menu_attributes(3X)													       menu_attributes(3X)

NAME
menu_attributes - color and attribute control for menus SYNOPSIS
#include <menu.h> int set_menu_fore(MENU *menu, chtype attr); chtype menu_fore(const MENU *menu); int set_menu_back(MENU *menu, chtype attr); chtype menu_back(const MENU *menu); int set_menu_grey(MENU *menu, chtype attr); chtype menu_grey(const MENU *menu); int set_menu_pad(MENU *menu, int pad); int menu_pad(const MENU *menu); DESCRIPTION
The function set_menu_fore sets the foreground attribute of menu. This is the highlight used for selected menu items. menu_fore returns the foreground attribute. The default is A_REVERSE. The function set_menu_back sets the background attribute of menu. This is the highlight used for selectable (but not currently selected) menu items. The function menu_back returns the background attribute. The default is A_NORMAL. The function set_menu_grey sets the grey attribute of menu. This is the highlight used for un-selectable menu items in menus that permit more than one selection. The function menu_grey returns the grey attribute. The default is A_UNDERLINE. The function set_menu_pad sets the character used to fill the space between the name and description parts of a menu item. menu_pad returns the given menu's pad character. The default is a blank. RETURN VALUE
These routines return one of the following: E_OK The routine succeeded. E_SYSTEM_ERROR System error occurred (see errno). E_BAD_ARGUMENT Routine detected an incorrect or out-of-range argument. SEE ALSO
curses(3X) and related pages whose names begin "menu_" for detailed descriptions of the entry points. NOTES
The header file <menu.h> automatically includes the header file <curses.h>. PORTABILITY
These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. AUTHORS
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. menu_attributes(3X)
All times are GMT -4. The time now is 07:23 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy