Seu script usa a sintaxe csh
, por isso não é um script sh
válido. A correção mínima para isso é usar sudo csh
em vez de sudo sh
.
No entanto, csh
não é muito popular, por boas razões; talvez a correção adequada seja reescrever seu script na sintaxe bash
(ou mesmo POSIX sh
).
Além do set
, parece não haver nada em seu script que use especificamente os recursos csh
. A sintaxe sh
para definir uma variável é
PROJ="-Jm1.4"
REG="-R40.0/49.0/28.0/38.0"
A ausência da palavra-chave set
e a ausência de espaços ao redor do sinal de igual são mudanças significativas e importantes.
Existem também muitos erros de opção que são (eu especulo) devido ao uso de versões diferentes dos programas. Não estou familiarizado com essas ferramentas, por isso não posso recomendar se atualizo, faço downgrade ou as substituo. Mudar para csh
em vez de sh
não alterará quais opções você tem permissão para usar com esses programas. Talvez você queira postar uma pergunta separada com mais informações - quais versões de grdcut
, grdgradient
, grdimage
, pscoast
, pstext
etc. esses scripts foram escritos para, quais versões você instalou agora e / ou talvez apenas o que seu script realmente tenta realizar.