The 'gjb2' function as no closing bracket }.
And similar to RudiC, i'd highly recomend that the default behaviour of funtions should be return.
However, the menu function should be the only function calling others, which already is.
Also use either break or return to exit a case statement within a function.
As you already have split up the functionality to functions.
It is recomended to 'list' the functions, rather than calling 1 function which calls the other which calls another, which calls another - as one might produce unexpected behaviour.
For better readability, try to always use the same indention-blocks.
Usualy thats either 4 or 8 spaces or tabs.
hth
---------- Post updated at 22:53 ---------- Previous update was at 22:40 ----------
Since the follow up handling for all the 3 functions is identical, i'd attempt something like:
As on grab the data from one of the selected functions, and pass it to the follow up functions, which seem to be identical for each of the selectables...
The 3 user choices are virtually the same except for the sed which applies the correct transcript with the user choice. For example, if the choice is GJB2 then the NM_ is different then if the user choice was MECP2. I am out of my element here and am needing some expert assistance in making this code work. I am trying to learn all the terms, but admittedly slower it seems. Thank you .
Thank you for the tips and help (very useful)... for the check function a file is created in C:/Users/cmccabe/Desktop/annovar/${id}.txt (attached), that has a warning column in it at $2 . If the variant has an error message in it can that be displayed as part of the check function? And if that field is blank "no errors" is displayed?
Also, in the echo -n what is the correct syntax to clear two or three files? Thank you
Also, in the echo -n what is the correct syntax to clear two or three files? Thank you
... ... ....
The command to create a regular file if it did not already exist or to truncate it to size zero if does already exist is:
Code:
> pathname
For more than one file, the syntax is:
Code:
> pathname1
> pathname2
...
> pathnameN
If the pathnames contain directories as well as a filename, that/those directory/directories must already exist for this to work. If you don't know if there might be missing directories, you can use:
Code:
mkdir -p "$(dirname pathname)" && > pathname
This User Gave Thanks to Don Cragun For This Post:
Hello everyone,
This code is working right using mate-terminal but with xfce4-terminal for some reason, it open up an extra tab...
Could someone please help me out to understand why this is happening?
#!/bin/bash
cd "$(dirname "$0")"/files
tab=" --tab"
title=" --title"
options=()... (2 Replies)
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)
I am beginning to write a new version of the bash menu below. The previous version worked great and now when I start the updated bash it opens and a some lines print in the terminal and it closes quickly. I know there are errors but how can I see them or fix them, I tried set -x with the same... (12 Replies)
The perl command is not executing? I am trying to run the .pl in my cygwin home directory (C:\cygwin\home\cmccabe) using ${id}.txt.hg19_multianno.txt (located in the annovar directory) as the input file to be formatted and $FILENAME is the output file to be saved. The .pl is attached as... (8 Replies)
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)
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)
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)
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)
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)
I have been trying to write a very basic chat program but at the moment I am having problems getting it to be multiuser as it closes all connections when one client shutsdown. I have also been having problems trying to get the program to display a list of usernames to the clients. I have tried... (0 Replies)