Hi,
bash script.sh
worked perfectly!!
Thank you so much!!
Hi,
I come up with
syntax error near unexpected token `('
when I run
> #!/bin/bash
> num1=$(paste <(gunzip -c $name1$ext) <(gunzip -c $name2$ext) | awk
> '!((NR+2)%4)' | grep -cE $ligation)
the code is from countligations.sh in juicer pipeline for Hi-C analysis. I asked the developer who told me to update some of my command line version, but still I can't solve it. I assume this might be simply because of the shell script matter.
Can anyone help me to fix this?
Best regards,
How are you running the script? If you run it as sh script.sh, it will run in POSIX compatiibility mode that does not support process substitution. Try running bash script.sh. Better yet, rename it to script.bash so you remember to use bash. If you're already running it using bash script.sh, I have no idea what could be happening.
Log in to answer this question.
bracket before
pasteis not closed andligationbracket is not closed.There are several issues with this code (based on OP code). Seems this is part of bigger problem.. what is the input for awk btw?
Thank you so much for your help.
The input for awk is
The above command is passed on to awk and then to grep, and all these calculation is summarized as $num1.
It seems it works by itself, but won't work when running the whole .sh script.
Any help is appreciated. Thanks in advance.
I got it wrong. sorry for that. can you post some example data?