Sponsored Content
Full Discussion: Get a value from menu.
Top Forums Shell Programming and Scripting Get a value from menu. Post 302279600 by mierdatuti on Friday 23rd of January 2009 08:27:50 AM
Old 01-23-2009
Get a value from menu.

Hi,

I have a shell-script (in bash) wich read from a file this:

1 Telediario 1 2009012609000
2 Mira quien baila 2009012511000
3 No mas 2009012603000
.....
.....
12 Quiero ser tu 20090127113000
13 Al igual que 20090127130000
.....
.....


In the script I would like that the user input a number, and I have to find this number and get the second field and the third field.
for example, he puts 13 and I have to find "Al igual que" and "20090127130000".


could you help me?
Many thanks and sorry for my english!
 

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Menu

How do i make a menu... I need to be able to select options that run scripts that i make. like displaying/adding/sorting/deleting records of a file. i have the displaying part down but I want to make the menu now then i'll figure out the deleting/adding/sorting. (5 Replies)
Discussion started by: space
5 Replies

2. Shell Programming and Scripting

Phone menu

Hello, Is there a way to read in user input inside a Here Document? The last line of the add(draft) file is supposed to redirect the user input to the phonebook file, but it is not doing that. I am not sure what I am doing wrong. So the redirected user input should be appended to the... (1 Reply)
Discussion started by: Dawg101
1 Replies

3. Shell Programming and Scripting

Need help with script for menu

I'm working on a script for a basic menu with four options. The first option for the menu asks a user to put in anyone's user name and is supposed to display the user's home directory. If a user does not enter a name, then their own home directory should be displayed. The second menu option is... (0 Replies)
Discussion started by: sinjin
0 Replies

4. Shell Programming and Scripting

Interactive menu

Hi ,some time ago i did an interactive menu based on eval function for navigation , one of the post remind me it. I think it could be handy for others. #!/usr/bin/ksh keyRead () { tput smso echo "Enter option." tput rmso oldstty=$(stty -g) stty -icanon -echo min 1 time 1 Answer=$(dd... (0 Replies)
Discussion started by: Klashxx
0 Replies

5. Shell Programming and Scripting

Menu in Menu script issue

Problem: I am trying to create a menu in a menu script and I am running into an issue with the calculator portion of the script. I am first presented with the ==Options Menu== which all 5 options working correctly. Now comes the fun part. I select option 1 which takes me to my ==Calculator... (1 Reply)
Discussion started by: iDdraig
1 Replies

6. Shell Programming and Scripting

Menu with sub-menu options

Hi! I have created on script which is working fine with menu options and with a sub-menu. I want to enhance it by using sub-options under menu options. Like. option 1) will give the list only. option 1.1) should give the option to user to choose one file, whose content user wanna see. ... (3 Replies)
Discussion started by: sukhdip
3 Replies

7. Shell Programming and Scripting

Need help in create menu with 3 sub menu using the case command

hi all i am a newbie to this is there any examples on creating a main menu with 3 sub menu main menu -> option a , b and c a menu -> option 1 ,2 and 3 b menu -> option 1 ,2 c menu -> option 1 ,2 i am getting headache as my code kept getting unexpected EOF ---------- Post... (0 Replies)
Discussion started by: chercm
0 Replies

8. UNIX for Beginners Questions & Answers

Gnome 3.28.3 menu item dissapears under the system menu

I installed CentOS 8 with Gnome 3.28.2 and I noticed that the "switch user" menu item disappeared from under the system menu of Gnome classic (Both X11 & Wayland). I checked google and this problem seems to have a history going back several releases of Gnome. Unfortunately, I never found a... (1 Reply)
Discussion started by: bodisha
1 Replies
DH_INSTALLMENU(1)						     Debhelper							 DH_INSTALLMENU(1)

NAME
dh_installmenu - install Debian menu files into package build directories SYNOPSIS
dh_installmenu [debhelperoptions] [-n] DESCRIPTION
dh_installmenu is a debhelper program that is responsible for installing files used by the Debian menu package into package build directories. It also automatically generates the postinst and postrm commands needed to interface with the Debian menu package. These commands are inserted into the maintainer scripts by dh_installdeb(1). FILES
debian/package.menu Debian menu files, installed into usr/share/menu/package in the package build directory. See menufile(5) for its format. debian/package.menu-method Debian menu method files, installed into etc/menu-methods/package in the package build directory. OPTIONS
-n, --no-scripts Do not modify postinst/postrm scripts. SEE ALSO
debhelper(7) update-menus(1) menufile(5) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_INSTALLMENU(1)
All times are GMT -4. The time now is 03:16 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy