Вопрос

I have a short bash script running samtools mpileup. It works fine locally, but when I try run it on SGE, I get an "illegal variable name" feedback.

#!/bin/bash
for f in $(find /bed_files  -name '*.bed' )
do 
name=$(echo $f | awk 'gsub("/", "_")')
name2=$(echo $name | awk 'gsub("_bed_files_", "")')
name3=$(echo $name2 | awk 'gsub(".bed", "")')
samtools runs here 
done

Is SGE variable syntax different to bash?

Это было полезно?

Решение

Yes, I needed to change the first line to:

 #$ -S /bin/sh
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top