Sponsored Content
Full Discussion: Bash code change
Top Forums Shell Programming and Scripting Bash code change Post 302945325 by cmccabe on Thursday 28th of May 2015 10:28:50 AM
Old 05-28-2015
Bash code change

I have the below bash which runs great. Before I make a change I wanted to check with experts (as I am not one). After the perl code completes, I am going to display "annotation complete" then go into the remove function .

Code:
 
annovar() {
    # combine id and position files
	cd 'C:\Users\cmccabe\Desktop\annovar'
	cp out_parse.txt "$(cat target.txt)"
	
	# run annotation
              $( perl -ne 'chomp; system ("perl table_annovar.pl $_ humandb/ -buildver hg19 -protocol refGene,popfreq_all,common,clinvar,clinvarsubmit,clinvarreference -operation g,f,f,f,f,f ")' < target.txt )
			  
     printf "The annotation is complete, would you like analyze additional target gene patients? Y/N "; read match_choice
	 case "$match_choice" in
        [yY]) id="${id}"; menu ;;
        [nN]) id="${id}"; remove ;;
		esac
}

My question is will something like this work: Thank you Smilie.

Code:
annovar() {
    # combine id and position files
	cd 'C:\Users\cmccabe\Desktop\annovar'
	cp out_parse.txt "$(cat target.txt)"
	
	# run annotation
              $( perl -ne 'chomp; system ("perl table_annovar.pl $_ humandb/ -buildver hg19 -protocol refGene,popfreq_all,common,clinvar,clinvarsubmit,clinvarreference -operation g,f,f,f,f,f ")' < target.txt )
			  
     printf "The annotation is complete "; remove
	  esac
}

 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

how to change shell from BASH to C

hi all, how can i change my shell from BASH to C shell? i am using cygwin. (3 Replies)
Discussion started by: npatwardhan
3 Replies

2. UNIX for Dummies Questions & Answers

Change the default shell from bash to ksh

Currently my default shell is bash.How can i change itto ksh... (2 Replies)
Discussion started by: dr46014
2 Replies

3. Shell Programming and Scripting

Automatically change to Bash shell after login

Hi men, I think this must be a very common job. "How could to Automatically change to Bash shell after login and then jail user can only using this shell". I want monitor user works.However it just only effect on Bash shell. Consequently if the user change the shell it will be worthless. ... (4 Replies)
Discussion started by: tien86
4 Replies

4. Shell Programming and Scripting

change the font size in bash

Hi, I would like to change the font size in bash. I know how do it in ksh: F_VDOBLE="\033#6" print "${F_VDOBLE}Esto es..." But in bash I don't know Could you help me please? Many thanks! (5 Replies)
Discussion started by: mierdatuti
5 Replies

5. UNIX for Dummies Questions & Answers

Bash encoding, how to change

Hey guys. The problem is : i need to change encoding (to be more precise UTF-8) or change the language . You see , when i log in , manuals are shown in 'Some symbols' (being written in 'Not English') and its very confusing to work. Please Help :) (3 Replies)
Discussion started by: IdleProc
3 Replies

6. Shell Programming and Scripting

How can i change my bash prompt ?

It looks like, user@hostname:/auto/home3/user$ Desired, user@hostname$ I added following line in .bashrc, but still its same. export PS1=" $ " Please help me :confused: (13 Replies)
Discussion started by: admax
13 Replies

7. Shell Programming and Scripting

change precision of bash variable

I have a variable in a bash script, DISTANCE=`awk 'BEGIN {FS="\t"} {if (NR==2) print $3;}' $OUTFILE` this is a real number taken from a file. The value are like, 0.334561754018 I am using this value in a file name, '$NAME'_'$DISTANCE'.txt I would like to shorten the number some to... (4 Replies)
Discussion started by: LMHmedchem
4 Replies

8. Shell Programming and Scripting

using awk or bash to change the format

tenxun-glibc_code-x86-64-linux-20120713190049.root.tar.bz2 To tenxun-glibc_code-x86-64-linux.root.tar.bz2 (3 Replies)
Discussion started by: yanglei_fage
3 Replies

9. Shell Programming and Scripting

bash commands to change processor

Say you got a for loop where each execution has 0 dependence on the other. Thus ideally you'd like to executed them all concurrently rather than iteratively (if you had enough CPUs). We don't quite have that many CPUs but I would like to instead partition the iterations between them. Or maybe... (10 Replies)
Discussion started by: stevensw
10 Replies

10. Shell Programming and Scripting

Change directory within a bash shell script

Hi, I have been trying to execute the below command by changing directory and then copying contents of one directory to another by doing some file name manipulations in between. However this isnt working since as soon as the statement completes it goes back to the original folder. Can someone... (5 Replies)
Discussion started by: HikingLife
5 Replies
Perl::Critic::Annotation(3pm)				User Contributed Perl Documentation			     Perl::Critic::Annotation(3pm)

NAME
Perl::Critic::Annotation - A "## no critic" annotation in a document. SYNOPSIS
use Perl::Critic::Annotation; $annotation = Perl::Critic::Annotation->new( -element => $no_critic_ppi_element ); $bool = $annotation->disables_line( $number ); $bool = $annotation->disables_policy( $policy_object ); $bool = $annotation->disables_all_policies(); ($start, $end) = $annotation->effective_range(); @disabled_policy_names = $annotation->disabled_policies(); DESCRIPTION
"Perl::Critic::Annotation" represents a single "## no critic" annotation in a <PPI:Document>. The Annotation takes care of parsing the annotation and keeps track of which lines and Policies it affects. It is intended to encapsulate the details of the no-critic annotations, and to provide a way for Policy objects to interact with the annotations (via a Perl::Critic::Document). INTERFACE SUPPORT
This is considered to be a non-public class. Its interface is subject to change without notice. CLASS METHODS
create_annotations( -doc => $doc ) Given a Perl::Critic::Document, finds all the "## no critic" annotations and constructs a new "Perl::Critic::Annotation" for each one and returns them. The order of the returned objects is not defined. It is generally expected that clients will use this interface rather than calling the "Perl::Critic::Annotation" constructor directly. CONSTRUCTOR
"new( -element => $ppi_annotation_element )" Returns a reference to a new Annotation object. The -element argument is required and should be a "PPI::Token::Comment" that conforms to the "## no critic" syntax. METHODS
"disables_line( $line )" Returns true if this Annotation disables $line for any (or all) Policies. "disables_policy( $policy_object )" "disables_policy( $policy_name )" Returns true if this Annotation disables $polciy_object or $policy_name at any (or all) lines. "disables_all_policies()" Returns true if this Annotation disables all Policies at any (or all) lines. If this method returns true, "disabled_policies" will return an empty list. "effective_range()" Returns a two-element list, representing the first and last line numbers where this Annotation has effect. "disabled_policies()" Returns a list of the names of the Policies that are affected by this Annotation. If this list is empty, then it means that all Policies are affected by this Annotation, and "disables_all_policies()" should return true. "element()" Returns the PPI::Element where this annotation started. This is typically an instance of PPI::Token::Comment. AUTHOR
Jeffrey Ryan Thalhammer <jeff@imaginative-software.com> COPYRIGHT
Copyright (c) 2005-2011 Imaginative Software Systems. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. The full text of this license can be found in the LICENSE file included with this module. perl v5.14.2 2012-06-07 Perl::Critic::Annotation(3pm)
All times are GMT -4. The time now is 03:18 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy