Sponsored Content
Full Discussion: menu + awk + while + case
Top Forums UNIX for Dummies Questions & Answers menu + awk + while + case Post 302577425 by zaxxon on Tuesday 29th of November 2011 04:28:13 AM
Old 11-29-2011
Change
Code:
1 ) echo 2 $c1 "  ;;      # these options are not shown

to
Code:
1 ) echo " $c1 "  ;;      # these options are not shown

As said already, please post an error message, if you get one, thanks. Script is working fine though the output is not very useful in my eyes.
As said already, have a look into basic shell scripting guides too, thanks. You can learn tons out of them.
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

awk case-insensitive

can I tell awk to be case insensitive for one operation without setting the ignorecase value ? thanks, Steffen (7 Replies)
Discussion started by: forever_49ers
7 Replies

2. Shell Programming and Scripting

Clear Case, Awk and script

Hello. I should have asked this awhile ago but here is my situation. My task is to generate LOC for different directories. I have a text file that has dates in this format (01-Aug-2006). My task is to read each line and compare it to a branch date. Depending on the date, it should generate a... (0 Replies)
Discussion started by: mastachef
0 Replies

3. Shell Programming and Scripting

what the awk do in this case

#!/bin/sh nowpwd=`pwd` cd $VAMPIRE_HOME configFile=$VAMPIRE_CFG/vampire.cfg inpuFileName=`awk -F\= '{ if ($1 == "PrepFilePos.InpFilePosDepo") { printf("%s",$2) exit 0 }}' < $configFile` I need to know what the awk doing here and what is the expected result here... (1 Reply)
Discussion started by: habuzahra
1 Replies

4. Shell Programming and Scripting

case-insensitive search with AWK

Hi All, How we can perform case-insensitive search with AWK.:rolleyes: regards, Sam (11 Replies)
Discussion started by: sam25
11 Replies

5. Shell Programming and Scripting

awk maintain case query

# Print list of word frequencies { $0 = tolower($0) for (i = 1; i <= NF; i++) counter++ } END { for (word in counter) printf "%s\t%d\n",word, counter } I have this simple awk code from awk user guide to count the frequency of word. Now consider the... (7 Replies)
Discussion started by: ajacobs365
7 Replies

6. Shell Programming and Scripting

Two columns output in simple case menu?

EDIT : System used : Any Linux distribution. Hello everyone, I m having quite a headache trying to figure out why I m having a 2 columns output in the following code : #!/bin/ksh menu_rotation() { #Variables CHOIX1="Rotation 1" CHOIX2="Rotation 2" CHOIX3="Rotation 3" ... (11 Replies)
Discussion started by: Sekullos
11 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. Shell Programming and Scripting

Menu and case statement scripting

hi all i am trying to get help with writing a script using case statement to display menu as 1) Authentication log 2) System log 3) Messages 4) Dmesg 5) Boot log Q) Exit When selecting the menu by 1 or 2 or 3 o 4 or 5, it should display the last 10 lines of the log files, if... (3 Replies)
Discussion started by: renegade11
3 Replies

9. Shell Programming and Scripting

Special case to skip function in bash menu

In the bash menu below if the variant that is inputted is in the format NM_004004.3:c.274G>T the below works perfectly. My question is if the variant inputted isNM_004004.3:-c.274G>T or NM_004004.3:+c.274G>T then the code as is will throw an error due to a biological issue. Is it possible to to... (1 Reply)
Discussion started by: cmccabe
1 Replies

10. 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
XmAddToPostFromList(library call)										 XmAddToPostFromList(library call)

NAME
XmAddToPostFromList -- a RowColumn function that makes a menu accessible from more than one widget SYNOPSIS
#include <Xm/RowColumn.h> void XmAddToPostFromList( Widget menu, Widget post_from_widget); DESCRIPTION
XmAddToPostFromList makes a menu accessible from more than one widget. After a menu is once created, this function may be used to make that menu accessible from a second widget. The process may be repeated indefinitely. In other words, where an application would use XmCreatePop- upMenu or XmCreatePulldownMenu or their equivalent to create a new menu identical to one that already exists, it can use this function to reuse that earlier menu. If menu refers to a Popup menu, then the post_from_widget widget can now pop up the specified menu. The actual posting of the menu occurs as it always does, either through an event handler, or the automatic popup menu support (see the XmRowColumn(3) reference page). If menu refers to a Pulldown menu, its ID is placed in the XmNsubMenuId resource of the specified post_from_widget. In this case, the post_from_widget widget must be either a CascadeButton or a CascadeButtonGadget. Note that this function manipulates the internal structures themselves, not a copy of them. menu Specifies the ID of the RowColumn widget containing the menu (Popup or Pulldown) to be made accessible from the widget. post_from_widget Specifies the widget ID of the widget which will now be able to post the menu specified by menu. For a complete definition of RowColumn and its associated resources, see XmRowColumn(3). RELATED
XmGetPostedFromWidget(3), XmRemoveFromPostFromList(3), and XmRowColumn(3). XmAddToPostFromList(library call)
All times are GMT -4. The time now is 01:04 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy