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.
Execute the command bash to get into a bash shell and then execute this:
That should tell you the paths that those commands are in:
If not, then your PATH variable is probably wrong, or maybe your system is missing some core files.
Execute this to see your path:
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
This User Gave Thanks to KenJackson For This Post:
@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.
I need to check my script and change to working mode. currently it was not sending the mail and exit without calling the second script.
I need to check the file is present ="/home/Rvtools/test.csv"
if this file not found after the time retry send mail file not found
If the file exit run the... (2 Replies)
I am running the export command within a view to use that value inside my build script. But while executing it it is saying "export command not found"
My code is as follows:
--------------------------
#!/bin/sh
user="test"
DIR="/bldtmp/"$user
VIEW="test.view1"
echo "TMPDIR before export... (4 Replies)
In a bash script, one can call a perl command in the following manner, where "myperlcommand" is a perl command.
perl -e 'myperlcommand(arguments)'
perl -e 'print("UUUU"x4)'
Now, how can one call a bash command from within a perl script? (Suppose that mybashcommand is a bash... (1 Reply)
hi,
i have a problem with my expect script, here is MyScript:
#!/usr/bin/expect
set pass
set c
set command
spawn sudo $command
expect "assword"
send "$pass\r"
expect eof My problem is that when i execute MyScript with the command : "./MyScript mypassword apt-get_install_git"i get... (6 Replies)
Hello experts,
I have a perl script which looks for the ARGV and then loads the data as per it.
Example.
#Checking the server to connect
if ($ARGV eq 'QA')
{
$ENV{"ORACLE_HOME"} = "/oracle/product/11.2.0";
$ENV{"PATH"} = "$ENV{'PATH'}:/oracle/product/11.2.0/bin";
... (1 Reply)
Hi,
I have been given assignment of 30 scripts out of which I was able to solve many, I need help with few out of which one asks to imitate head and tail command of unix without using the head and tail commands. Problem is stated below:
Write an interactive shell script to imitate the head... (5 Replies)
Dear Freinds,
Help needed in input redirection .
My problem is as follows..
I have a shell script as follows which calls another gnuplot script .
datagen.sh
#!/bin/ksh
gnuplot plot_I.plt
In the above file I am calling another file called plot_I.plt which reside in the same... (4 Replies)
Hello
say i have written some perl scripts , now i like to call them in my unix shell
as unix command like "more" , "ls" , "grep" so that my say perl script called "foo.pl"
will be called from every where as "foo" or "foo arg1 arg2"?
Thanks (1 Reply)