Sponsored Content
Top Forums UNIX for Beginners Questions & Answers How to pass a single quote to the program? Post 303036115 by Aurimas on Friday 14th of June 2019 09:08:29 AM
Old 06-14-2019
My input was:

Code:
#!/bin/bash
read -p "amino acid: " AAA
if [[ "ALA ARG ASN ASP CYS GLN GLY GLU HIS ILE \
	   LEU LYS MET PHE PRO SER THR TRP TYR VAL" =~ $AAA ]]
then
	for i in HS_*.pdb; 
		do
    		cat $i | voronota get-balls-from-atoms-file --annotated \
    			   | voronota calculate-contacts --annotated \
    			   | voronota query-contacts --inter-residue --match-first "'R<$AAA>'" --match-second "'A<C1',C2',C3',C4',C5',O1,O2,O3,O4,O5,O1',O2',O3',O4',O5',N1,N2,N3,C1,C2,C3,C4,C5>'" \
    			   | awk '{sum += $3} END {print sum}'
		done
else
	exit 1
fi

Then I wrote ./voronota_improved_interface_atoms.sh
When asked for amino acid: I entered ALA and the answer given was 28 blank values:
Code:

So apperently single quote is not passed as an argument unless I am doing something wrong :/
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Replacing a single quote

Hi there I have a data file like so below 'A/1';'T100002';'T100002';'';'01/05/2004';'31/05/2004';'01/06/2004';'08/06/2004';'1.36';'16';'0.22';'0';'0';'1.58';'0';'0';'0';'0';'0';'0';'clientes\resumen\200405\resumen_T100002_T100002_1.pdf';'';'0001';'S';'20040501';'';'02';'0';'S';'N'... (3 Replies)
Discussion started by: rjsha1
3 Replies

2. Shell Programming and Scripting

single quote

Hi I have a shell script with many lines as below: comment on column dcases.proj_seq_num is dcases_1sq; .... .... I want the above script to be as below: comment on column dcases.proj_seq_num is 'dcases_1sq'; I want to have single quotes like that as above for the entire shell... (2 Replies)
Discussion started by: dreams5617
2 Replies

3. Shell Programming and Scripting

escaping single quote

hi, echo 'abc' will give output abc how can i get output as 'abc' plz help. thanks in advance (3 Replies)
Discussion started by: javeed7
3 Replies

4. Shell Programming and Scripting

Regex in grep to match all lines ending with a double quote (") OR a single quote (')

Hi, I've been trying to write a regex to use in egrep (in a shell script) that'll fetch the names of all the files that match a particular pattern. I expect to match the following line in a file: Name = "abc" The regex I'm using to match the same is: egrep -l '(^) *= *" ** *"$' /PATH_TO_SEARCH... (6 Replies)
Discussion started by: NanJ
6 Replies

5. Shell Programming and Scripting

Replace single quote with two single quotes in perl

Hi I want to replace single quote with two single quotes in a perl string. If the string is <It's Simpson's book> It should become <It''s Simpson''s book> (3 Replies)
Discussion started by: DushyantG
3 Replies

6. Shell Programming and Scripting

single quote replacement

hi all, i have a data in the file which of the formate : 100,102,103 and the required formate is \'100\',\'102\',\'103 Idealy we need to replace , with \',\' Regards arkesh (2 Replies)
Discussion started by: arkeshtk
2 Replies

7. Shell Programming and Scripting

How to insert a single quote to each record

I have a file as: 1 New used 1 used New I need o/p as: '1' 'New' 'used' '1' 'used' 'New' (12 Replies)
Discussion started by: karumudi7
12 Replies

8. Shell Programming and Scripting

Replacing all but the first and last double quote in a line with a single quote with awk

From: 1,2,3,4,5,This is a test 6,7,8,9,0,"This, is a test" 1,9,2,8,3,"This is a ""test""" 4,7,3,1,8,"""" To: 1,2,3,4,5,This is a test 6,7,8,9,0,"This; is a test" 1,9,2,8,3,"This is a ''test''" 4,7,3,1,8,"''"Is there an easy syntax I'm overlooking? There will always be an odd number... (5 Replies)
Discussion started by: Michael Stora
5 Replies

9. Shell Programming and Scripting

Awk: single quote match in If

Hello, I'd like to print line if column 5th doesn't match with exm. But to reach there I have to make sure I match single quote. I'm struggling to match that. I've input file like: Warning: Variants 'exm480340' and '5:137534453:G:C' have the same position. Warning: Variants 'exm480345'... (9 Replies)
Discussion started by: genome
9 Replies

10. Shell Programming and Scripting

Single quote _error_.

Hi all... (This is Don's domain.) I have come across an anomaly in sh and dash compared to bash. It involves echoing a character set to a file in sh and dash compared to bash. It is probably easier to show the code and results first. #!/usr/local/bin/dash #!/bin/sh #!/bin/bash echo... (4 Replies)
Discussion started by: wisecracker
4 Replies
Bio::Phenotype::OMIM::OMIMentryAllelicVariant(3pm)	User Contributed Perl Documentation	Bio::Phenotype::OMIM::OMIMentryAllelicVariant(3pm)

NAME
Bio::Phenotype::OMIM::OMIMentryAllelicVariant - Representation of a allelic variant of the OMIM database SYNOPSIS
use Bio::Phenotype::OMIM::OMIMentryAllelicVariant; $av = Bio::Phenotype::OMIM::OMIMentryAllelicVariant->new( -number => ".0001", -title => "ALCOHOL INTOLERANCE", -symbol => "ALDH2*2", -description => "The ALDH2*2-encoded ...", -aa_ori => "GLU", -aa_mut => "LYS", -position => 487, -additional_mutations => "IVS4DS, G-A, +1" ); DESCRIPTION
This class models the allelic variant of the OMIM database. This class is intended to be used together with a OMIM entry class. FEEDBACK
Mailing Lists User feedback is an integral part of the evolution of this and other Bioperl modules. Send your comments and suggestions preferably to one of the Bioperl mailing lists. Your participation is much appreciated. bioperl-l@bioperl.org - General discussion http://bioperl.org/wiki/Mailing_lists - About the mailing lists Support Please direct usage questions or support issues to the mailing list: bioperl-l@bioperl.org rather than to the module maintainer directly. Many experienced and reponsive experts will be able look at the problem and quickly address it. Please include a thorough description of the problem with code and data examples if at all possible. Reporting Bugs Report bugs to the Bioperl bug tracking system to help us keep track the bugs and their resolution. Bug reports can be submitted via the web: https://redmine.open-bio.org/projects/bioperl/ AUTHOR
Christian M. Zmasek Email: czmasek-at-burnham.org or cmzmasek@yahoo.com WWW: http://monochrome-effect.net/ Address: Genomics Institute of the Novartis Research Foundation 10675 John Jay Hopkins Drive San Diego, CA 92121 APPENDIX
The rest of the documentation details each of the object methods. new Title : new Usage : $av = Bio::Phenotype::OMIM::OMIMentryAllelicVariant->new( -number => ".0001", -title => "ALCOHOL INTOLERANCE", -symbol => "ALDH2*2", -description => "The ALDH2*2-encoded ...", -aa_ori => "GLU", -aa_mut => "LYS", -position => 487, -additional_mutations => "IVS4DS, G-A, +1" ); Function: Creates a new OMIMentryAllelicVariant object. Returns : A new OMIMentryAllelicVariant object. Args : -number => the OMIM allelic variant number -title => the title -symbol => a symbol -description => a description -aa_ori => the original amino acid -aa_mut => the mutated amino acid -position => the position of the mutation -additional_mutations => free form description of additional mutations init Title : init() Usage : $av->init(); Function: Initializes this OMIMentryAllelicVariant to all "". Returns : Args : number Title : number Usage : $av->number( ".0001" ); or print $av->number(); Function: Set/get for the OMIM allelic variant number of this OMIMentryAllelicVariant. Returns : The OMIM allelic variant number. Args : The OMIM allelic variant number (optional). title Title : title Usage : $av->title( "ALCOHOL INTOLERANCE" ); or print $av->title(); Function: Set/get for the title of this OMIMentryAllelicVariant. Returns : The title. Args : The title (optional). symbol Title : symbol Usage : $av->symbol( "ALDH2*2" ); or print $av->symbol(); Function: Set/get for the symbol of this OMIMentryAllelicVariant. Returns : A symbol. Args : A symbol (optional). description Title : description Usage : $av->description( "The ALDH2*2-encoded protein has a change ..." ); or print $av->description(); Function: Set/get for the description of this OMIMentryAllelicVariant. Returns : A description. Args : A description (optional). aa_ori Title : aa_ori Usage : $av->aa_ori( "GLU" ); or print $av->aa_ori(); Function: Set/get for the original amino acid(s). Returns : The original amino acid(s). Args : The original amino acid(s) (optional). aa_mut Title : aa_mut Usage : $av->aa_mut( "LYS" ); or print $av->aa_mut(); Function: Set/get for the mutated amino acid(s). Returns : The mutated amino acid(s). Args : The mutated amino acid(s) (optional). position Title : position Usage : $av->position( 487 ); or print $av->position(); Function: Set/get for the position of the mutation. Returns : The position of the mutation. Args : The position of the mutation (optional). additional_mutations Title : additional_mutations Usage : $av->additional_mutations( "1-BP DEL, 911T" ); or print $av->additional_mutations(); Function: Set/get for free form description of (additional) mutation(s). Returns : description of (additional) mutation(s). Args : description of (additional) mutation(s) (optional). to_string Title : to_string() Usage : print $av->to_string(); Function: To string method for OMIMentryAllelicVariant objects. Returns : A string representations of this OMIMentryAllelicVariant. Args : perl v5.14.2 2012-03-02 Bio::Phenotype::OMIM::OMIMentryAllelicVariant(3pm)
All times are GMT -4. The time now is 03:10 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy