Single Quotes in Shell Script Compilation Error #2539
-
Greetings, I am using the Shell block for one of my processes because I use a combination of Bash and Nextflow variables in it. One of the commands in the script is as follows: echo '!"#$%&'''()*+,-./0123456789:;<=>?@abcdefghijklmnopqrstuvwxyz[]^_`abcdefghijklmnopqrstuvwxyz{|}~' | fold -w 1 > QS_matches.txt This reproducibly causes a compilation error (see below) for the process, and it points to the 3 single quotes that begin the shell block as the issue, where line 186 below refers to the start of the shell block: N E X T F L O W ~ version 21.10.6
1 error Running the "echo" command outside of Nextflow works fine, so I suspect it has something to do with too many single quotes being used in the command. Any thoughts on what I might be doing wrong here? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Hi, See if the following helps (it works for me):
This is the content of the output file:
I exploited the capability offered by Bash to glue both kinds of quotations (single and double) and then used |
Beta Was this translation helpful? Give feedback.
Hi,
See if the following helps (it works for me):
This is the content of the output file:
I exploited the capability offered by Bash to glue both kinds of quotations (single and double) and then used
"'"
to quote each single quote inside your string.