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

Dear forum members,

My question is simple. I want to pass a single quote (') to be read as belonging as an addition to the letters C1', C2', C3', C4', C5', O1', O2', O3', O4' & O5' to the program voronota query-contacts which would be run through shell script and should print out numerical values. I tried writing C1\', C2\', C3\', etc. but am getting no results (blank when I am expecting numbers). Thus the question is how could I pass these letters with a single quote as an argument to voronota query-contacts command? The script is this:
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

The output through command line in all the ways described I get is a blank one:
Code:

Thank you very much for your help. I will look forward to your responses.

Yours Sincerely,
Aurimas
 

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
RINGS3D(1)						      General Commands Manual							RINGS3D(1)

NAME
rigns3d - produces a file of ring-filling triangles from a PDB file SYNOPSIS
rings3d [-bases] [-protein] [-sugars] < infile.pdb > outfile.r3d rings3d searches through a PDB file looking for residues containing 5- or 6-membered rings, then produces a Raster3D output file of ring- filling triangles. rings3d matches residue types from an internal list of residue and atom names. It will fail to find residues not in its list, and fail to recognize atoms with non-standard names. EXAMPLES
render a DNA molecule with the bases filled in: cat $R3D_LIB/dna.colours dna.pdb | rods -radius 0.05 > temp.1 rings3d -bases < dna.pdb > temp.2 cat temp.1 temp.2 | render -tiff dna.tiff OPTIONS
-bases Fills in purine and pyrimidine rings from A C G T U residues. -protein Fills in sidechain rings of HIS PHE TRP and TYR residues. -sugars [This is the default] Fills in pyranose rings of GAL GLC NAG NGA MAN SIA residues. BUGS
limited residue types The database of residue types should be kept externally, so you don't have to rebuild the program to add a new type. There should be an option to search for ring systems in un-recognized residue types. crinkled planes There should be an option to do a least-squares best plane through supposedly flat rings. Then again, seeing a crease in a "flat" ring may force people to consider whether their planarity restraints are tight enough. SOURCE
anonymous ftp site: ftp.bmsc.washington.edu web URL: http://www.bmsc.washington.edu/raster3d/raster3d.html contact: Ethan A Merritt Dept of Biological Structure Box 357742 University of Washington, Seattle WA 98195 merritt@u.washington.edu SEE ALSO
Raster3D(l) AUTHORS
Ethan A Merritt. This manual page was written by Nelson A. de Oliveira <naoliv@gmail.com>, for the Debian project (but may be used by others). Raster3D RINGS3D(1)
All times are GMT -4. The time now is 10:54 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy