i am launching a script which open a ssh connexion to a cluster's node. Once on the node, the script calls the problematic command head and wc.
I receive a message error as follow which come from two different scripts :
line 31: head: command not found
line 18: wc: command not found
After reading on the forum, it seems that this problem might be related to the shell I am using.
right now i am calling :
./launchTest 2 3
and after calling echo $0, i can see that my shell is : -csh
What is strange is if i type the head command exactly like in the script but directly from the command line of the node, it is working.
whereas when head or wc is called from the script, it doesnt work.
I noticed that both scripts which calls head and wc are starting with : #!/bin/bash
so i tryed to launch the script with the shell bash but I have the same problem.
Anybody has a solution or any idea because I am totally blocked right now.
Wow! That's kind of a mess. Those curly brace characters {} don't belong there.
But I do see /usr/bin, and the type command found the executables, after all.
Oh wait! Rereading your original post I see you are opening an SSH connection to another host and the problem happens over there. Right? So the path problem is probably over there.
Do you have your own account on that host?
Cluster? I haven't used a cluster since the VAX/VMS days, but maybe that that means you have one account that works on any host in the cluster.
In any case, hopefully you can SSH directly to it and investigate:
ssh OTHERHOST
@masy1800
Please post any relevant script line which mentions $PATH.
We are probably looking for a line which is missing a $ sign or contains the wrong sort of quotes.