The hope was to store the output directory as a variable ($FILENAME) but I don't think that is the right way to do it. I changed the code to the below and put the .pl in the annovar directory to make it easier.
The overall goal is use ${id}.txt.hg19_multianno.txt as the input file and after the perl script is run on that file the output file is saved to the path L:\NGS\3_BUSINESS\Matrix\Torrent\matrix_${id}.txt . Thank you .
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)
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)
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)
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)
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)
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)
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)
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)
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)
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
LEARN ABOUT DEBIAN
mojo::command
Mojo::Command(3pm) User Contributed Perl Documentation Mojo::Command(3pm)NAME
Mojo::Command - Command base class
SYNOPSIS
# Lower case command name
package Mojolicious::Command::mycommand;
# Subclass
use Mojo::Base 'Mojo::Command';
# Take care of command line options
use Getopt::Long 'GetOptions';
# Short description
has description => "My first Mojo command.
";
# Short usage message
has usage => <<"EOF";
usage: $0 mycommand [OPTIONS]
These options are available:
-s, --something Does something.
EOF
# <suitable Futurama quote here>
sub run {
my $self = shift;
# Handle options
local @ARGV = @_;
GetOptions('s|something' => sub { $something = 1 });
# Magic here! :)
}
DESCRIPTION
Mojo::Command is an abstract base class for Mojo commands.
See Mojolicious::Commands for a list of commands that are available by default.
ATTRIBUTES
Mojo::Command implements the following attributes.
"description"
my $description = $command->description;
$command = $command->description('Foo!');
Short description of command, used for the command list.
"quiet"
my $quiet = $command->quiet;
$command = $command->quiet(1);
Limited command output.
"usage"
my $usage = $command->usage;
$command = $command->usage('Foo!');
Usage information for command, used for the help screen.
METHODS
Mojo::Command inherits all methods from Mojo::Base and implements the following new ones.
"app"
my $app = $command->app;
Currently active application.
# Introspect
say "Template path: $_" for @{$command->app->renderer->paths};
"chmod_file"
$command = $command->chmod_file('/home/sri/foo.txt', 0644);
Portably change mode of a file.
"chmod_rel_file"
$command = $command->chmod_rel_file('foo/foo.txt', 0644);
Portably change mode of a file relative to the current working directory.
"class_to_file"
my $file = $command->class_to_file('Foo::Bar');
Convert a class name to a file.
Foo::Bar -> foo_bar
FOO::Bar -> foobar
FooBar -> foo_bar
FOOBar -> foobar
"class_to_path"
my $path = $command->class_to_path('Foo::Bar');
Convert class name to path.
Foo::Bar -> Foo/Bar.pm
"create_dir"
$command = $command->create_dir('/home/sri/foo/bar');
Portably create a directory.
"create_rel_dir"
$command = $command->create_rel_dir('foo/bar/baz');
Portably create a directory relative to the current working directory.
"get_all_data"
my $all = $command->get_all_data;
my $all = $command->get_all_data('Some::Class');
Extract all embedded files from the "DATA" section of a class.
"get_data"
my $data = $command->get_data('foo_bar');
my $data = $command->get_data('foo_bar', 'Some::Class');
Extract embedded file from the "DATA" section of a class.
"help"
$command->help;
Print usage information for command.
"rel_dir"
my $path = $command->rel_dir('foo/bar');
Portably generate an absolute path for a directory relative to the current working directory.
"rel_file"
my $path = $command->rel_file('foo/bar.txt');
Portably generate an absolute path for a file relative to the current working directory.
"render_data"
my $data = $command->render_data('foo_bar', @args);
Render a template from the "DATA" section of the command class.
"render_to_file"
$command = $command->render_to_file('foo_bar', '/home/sri/foo.txt');
Render a template from the "DATA" section of the command class to a file.
"render_to_rel_file"
$command = $command->render_to_rel_file('foo_bar', 'foo/bar.txt');
Portably render a template from the "DATA" section of the command class to a file relative to the current working directory.
"run"
$command->run;
$command->run(@ARGV);
Run command. Meant to be overloaded in a subclass.
"write_file"
$command = $command->write_file('/home/sri/foo.txt', 'Hello World!');
Portably write text to a file.
"write_rel_file"
$command = $command->write_rel_file('foo/bar.txt', 'Hello World!');
Portably write text to a file relative to the current working directory.
SEE ALSO
Mojolicious, Mojolicious::Guides, <http://mojolicio.us>.
perl v5.14.2 2012-09-05 Mojo::Command(3pm)