cannot open `' for reading: No such file or directory Announcing the arrival of Valued...
Dating a Former Employee
Fundamental Solution of the Pell Equation
What's the purpose of writing one's academic biography in the third person?
2001: A Space Odyssey's use of the song "Daisy Bell" (Bicycle Built for Two); life imitates art or vice-versa?
English words in a non-english sci-fi novel
How to react to hostile behavior from a senior developer?
How to call a function with default parameter through a pointer to function that is the return of another function?
What would be the ideal power source for a cybernetic eye?
Why am I getting the error "non-boolean type specified in a context where a condition is expected" for this request?
If a contract sometimes uses the wrong name, is it still valid?
How can I make names more distinctive without making them longer?
Overriding an object in memory with placement new
Can a non-EU citizen traveling with me come with me through the EU passport line?
How come Sam didn't become Lord of Horn Hill?
Why aren't air breathing engines used as small first stages
Echoing a tail command produces unexpected output?
What is Arya's weapon design?
Sci-Fi book where patients in a coma ward all live in a subconscious world linked together
Is it ethical to give a final exam after the professor has quit before teaching the remaining chapters of the course?
Apollo command module space walk?
Bete Noir -- no dairy
What does an IRS interview request entail when called in to verify expenses for a sole proprietor small business?
How discoverable are IPv6 addresses and AAAA names by potential attackers?
What is a non-alternating simple group with big order, but relatively few conjugacy classes?
cannot open `' for reading: No such file or directory
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)Writing my first bash script (line 2: testscript: No such file or directory)My bash script does not find an existing fileWriting shell scripts that will run on any shell (using multiple shebang lines?)Workaround for ENOTTY while running a c process from script?Shell script detecting errors from command called by scriptRunning commands and shell scripts in UbuntuWhat does NOEXEC flag mean when mounting directories on RHEL?RHEL 6 HP Tape Driver Installation TroublesActivate virtualenv using aliasRemote Copy of All Traits of a File Except for its Content
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am trying to run .sh file on RH6 and getting this error...
cannot open '' for reading: No such file or directory
The script I am running is internally referencing other scripts, located in same directory. I can see them using ls -la.
Note: This script is working perfectly fine on RH4. I got new fresh RH6 machine on which I am trying to run my scripts.
My abc.sh script as mentioned below
. fox_comm_server_details.sh
. fox_comm_topic_names.sh
. fox_comm_sh_tools.sh
refers to other script (.sh) files.
When I run my abc.sh (with ./abc.sh) it says
fox_comm_server_details.sh: cannot open [No such file or directory]
I confirmed the required scripts are present in directory and I have permissions on them.
If I update the abc.sh as below...
. ./fox_comm_server_details.sh
. ./fox_comm_topic_names.sh
. ./fox_comm_sh_tools.sh
This time it is not complaining about missing files but some different error as mentioned below...
read_fox_comm_servers_list[134]: read_fox_comm_servers_list_defaults[37]: local: not found [No such file or directory]
read_fox_comm_servers_list and read_fox_comm_servers_list_defaults are functions that are defined in fox_comm_sh_tools.sh as follows...
function read_fox_comm_servers_list
{
read_fox_comm_servers_list_defaults
read_fox_comm_servers_list_overrides
}
function read_fox_comm_servers_list_defaults
{
local tempfile=/tmp/read_fox_comm_servers_list_defaults.$$
}
and getting above mentioned error.
shell-script redhat-enterprise-linux
bumped to the homepage by Community♦ 19 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
add a comment |
I am trying to run .sh file on RH6 and getting this error...
cannot open '' for reading: No such file or directory
The script I am running is internally referencing other scripts, located in same directory. I can see them using ls -la.
Note: This script is working perfectly fine on RH4. I got new fresh RH6 machine on which I am trying to run my scripts.
My abc.sh script as mentioned below
. fox_comm_server_details.sh
. fox_comm_topic_names.sh
. fox_comm_sh_tools.sh
refers to other script (.sh) files.
When I run my abc.sh (with ./abc.sh) it says
fox_comm_server_details.sh: cannot open [No such file or directory]
I confirmed the required scripts are present in directory and I have permissions on them.
If I update the abc.sh as below...
. ./fox_comm_server_details.sh
. ./fox_comm_topic_names.sh
. ./fox_comm_sh_tools.sh
This time it is not complaining about missing files but some different error as mentioned below...
read_fox_comm_servers_list[134]: read_fox_comm_servers_list_defaults[37]: local: not found [No such file or directory]
read_fox_comm_servers_list and read_fox_comm_servers_list_defaults are functions that are defined in fox_comm_sh_tools.sh as follows...
function read_fox_comm_servers_list
{
read_fox_comm_servers_list_defaults
read_fox_comm_servers_list_overrides
}
function read_fox_comm_servers_list_defaults
{
local tempfile=/tmp/read_fox_comm_servers_list_defaults.$$
}
and getting above mentioned error.
shell-script redhat-enterprise-linux
bumped to the homepage by Community♦ 19 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
3
Please edit your question to include the script you are trying to run.
– DavidPostill♦
Feb 9 '15 at 12:34
And provide the result of ls -l command. Also did you arr read permission to the script? They can't work w/o this permission
– Romeo Ninov
Feb 9 '15 at 12:50
What is line 1 of your script. If it's#!/bin/sh, do you know what/bin/shis on your system (e.g., is it bash or dash)? ... I guess that the134and37in the error message(s) are line numbers. You're probably right not to dump the entire 135+ line script on us, but have you tried deleting lines from (a working, debug copy of) the script until the error goes away? Try that -- the last thing you deleted will probably be a big clue to the problem.
– G-Man
Feb 10 '15 at 19:49
add a comment |
I am trying to run .sh file on RH6 and getting this error...
cannot open '' for reading: No such file or directory
The script I am running is internally referencing other scripts, located in same directory. I can see them using ls -la.
Note: This script is working perfectly fine on RH4. I got new fresh RH6 machine on which I am trying to run my scripts.
My abc.sh script as mentioned below
. fox_comm_server_details.sh
. fox_comm_topic_names.sh
. fox_comm_sh_tools.sh
refers to other script (.sh) files.
When I run my abc.sh (with ./abc.sh) it says
fox_comm_server_details.sh: cannot open [No such file or directory]
I confirmed the required scripts are present in directory and I have permissions on them.
If I update the abc.sh as below...
. ./fox_comm_server_details.sh
. ./fox_comm_topic_names.sh
. ./fox_comm_sh_tools.sh
This time it is not complaining about missing files but some different error as mentioned below...
read_fox_comm_servers_list[134]: read_fox_comm_servers_list_defaults[37]: local: not found [No such file or directory]
read_fox_comm_servers_list and read_fox_comm_servers_list_defaults are functions that are defined in fox_comm_sh_tools.sh as follows...
function read_fox_comm_servers_list
{
read_fox_comm_servers_list_defaults
read_fox_comm_servers_list_overrides
}
function read_fox_comm_servers_list_defaults
{
local tempfile=/tmp/read_fox_comm_servers_list_defaults.$$
}
and getting above mentioned error.
shell-script redhat-enterprise-linux
I am trying to run .sh file on RH6 and getting this error...
cannot open '' for reading: No such file or directory
The script I am running is internally referencing other scripts, located in same directory. I can see them using ls -la.
Note: This script is working perfectly fine on RH4. I got new fresh RH6 machine on which I am trying to run my scripts.
My abc.sh script as mentioned below
. fox_comm_server_details.sh
. fox_comm_topic_names.sh
. fox_comm_sh_tools.sh
refers to other script (.sh) files.
When I run my abc.sh (with ./abc.sh) it says
fox_comm_server_details.sh: cannot open [No such file or directory]
I confirmed the required scripts are present in directory and I have permissions on them.
If I update the abc.sh as below...
. ./fox_comm_server_details.sh
. ./fox_comm_topic_names.sh
. ./fox_comm_sh_tools.sh
This time it is not complaining about missing files but some different error as mentioned below...
read_fox_comm_servers_list[134]: read_fox_comm_servers_list_defaults[37]: local: not found [No such file or directory]
read_fox_comm_servers_list and read_fox_comm_servers_list_defaults are functions that are defined in fox_comm_sh_tools.sh as follows...
function read_fox_comm_servers_list
{
read_fox_comm_servers_list_defaults
read_fox_comm_servers_list_overrides
}
function read_fox_comm_servers_list_defaults
{
local tempfile=/tmp/read_fox_comm_servers_list_defaults.$$
}
and getting above mentioned error.
shell-script redhat-enterprise-linux
shell-script redhat-enterprise-linux
edited Sep 18 '16 at 1:23
fixer1234
19.6k145083
19.6k145083
asked Feb 9 '15 at 12:29
user417090user417090
112
112
bumped to the homepage by Community♦ 19 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 19 hours ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
3
Please edit your question to include the script you are trying to run.
– DavidPostill♦
Feb 9 '15 at 12:34
And provide the result of ls -l command. Also did you arr read permission to the script? They can't work w/o this permission
– Romeo Ninov
Feb 9 '15 at 12:50
What is line 1 of your script. If it's#!/bin/sh, do you know what/bin/shis on your system (e.g., is it bash or dash)? ... I guess that the134and37in the error message(s) are line numbers. You're probably right not to dump the entire 135+ line script on us, but have you tried deleting lines from (a working, debug copy of) the script until the error goes away? Try that -- the last thing you deleted will probably be a big clue to the problem.
– G-Man
Feb 10 '15 at 19:49
add a comment |
3
Please edit your question to include the script you are trying to run.
– DavidPostill♦
Feb 9 '15 at 12:34
And provide the result of ls -l command. Also did you arr read permission to the script? They can't work w/o this permission
– Romeo Ninov
Feb 9 '15 at 12:50
What is line 1 of your script. If it's#!/bin/sh, do you know what/bin/shis on your system (e.g., is it bash or dash)? ... I guess that the134and37in the error message(s) are line numbers. You're probably right not to dump the entire 135+ line script on us, but have you tried deleting lines from (a working, debug copy of) the script until the error goes away? Try that -- the last thing you deleted will probably be a big clue to the problem.
– G-Man
Feb 10 '15 at 19:49
3
3
Please edit your question to include the script you are trying to run.
– DavidPostill♦
Feb 9 '15 at 12:34
Please edit your question to include the script you are trying to run.
– DavidPostill♦
Feb 9 '15 at 12:34
And provide the result of ls -l command. Also did you arr read permission to the script? They can't work w/o this permission
– Romeo Ninov
Feb 9 '15 at 12:50
And provide the result of ls -l command. Also did you arr read permission to the script? They can't work w/o this permission
– Romeo Ninov
Feb 9 '15 at 12:50
What is line 1 of your script. If it's
#!/bin/sh, do you know what /bin/sh is on your system (e.g., is it bash or dash)? ... I guess that the 134 and 37 in the error message(s) are line numbers. You're probably right not to dump the entire 135+ line script on us, but have you tried deleting lines from (a working, debug copy of) the script until the error goes away? Try that -- the last thing you deleted will probably be a big clue to the problem.– G-Man
Feb 10 '15 at 19:49
What is line 1 of your script. If it's
#!/bin/sh, do you know what /bin/sh is on your system (e.g., is it bash or dash)? ... I guess that the 134 and 37 in the error message(s) are line numbers. You're probably right not to dump the entire 135+ line script on us, but have you tried deleting lines from (a working, debug copy of) the script until the error goes away? Try that -- the last thing you deleted will probably be a big clue to the problem.– G-Man
Feb 10 '15 at 19:49
add a comment |
1 Answer
1
active
oldest
votes
A shot in the dark:
please edit your question clicking on this link because so it's really difficult to understand.
In general is seems that somewhere in a script (or in a subscript) a variable is not set with a filename.
You can notice from '' without a name inside in your error message
cannot open '' for reading: No such file or directory
You can search where is the error activating the debug in your shell
set -x # to activate debugging
./myscript.sh # here your script invocation
set +x # to stop debugging
1
This won't quite work. Shell options (e.g., xtrace, or-xfor short) are not passed from parent to child, so this will only say that the user is runningmyscript.sh, but not what happens in the script. For that you would need one of the following: (1)set -x; . myscript.sh; set +x(probably not a good idea), (2)(set -x; . myscript.sh)(note the parentheses), (3)sh -x myscript.sh, or (4) editmyscript.shand append-xto the she-bang line (the#!/bin/shon the first line).
– G-Man
Feb 10 '15 at 19:51
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f875624%2fcannot-open-for-reading-no-such-file-or-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
A shot in the dark:
please edit your question clicking on this link because so it's really difficult to understand.
In general is seems that somewhere in a script (or in a subscript) a variable is not set with a filename.
You can notice from '' without a name inside in your error message
cannot open '' for reading: No such file or directory
You can search where is the error activating the debug in your shell
set -x # to activate debugging
./myscript.sh # here your script invocation
set +x # to stop debugging
1
This won't quite work. Shell options (e.g., xtrace, or-xfor short) are not passed from parent to child, so this will only say that the user is runningmyscript.sh, but not what happens in the script. For that you would need one of the following: (1)set -x; . myscript.sh; set +x(probably not a good idea), (2)(set -x; . myscript.sh)(note the parentheses), (3)sh -x myscript.sh, or (4) editmyscript.shand append-xto the she-bang line (the#!/bin/shon the first line).
– G-Man
Feb 10 '15 at 19:51
add a comment |
A shot in the dark:
please edit your question clicking on this link because so it's really difficult to understand.
In general is seems that somewhere in a script (or in a subscript) a variable is not set with a filename.
You can notice from '' without a name inside in your error message
cannot open '' for reading: No such file or directory
You can search where is the error activating the debug in your shell
set -x # to activate debugging
./myscript.sh # here your script invocation
set +x # to stop debugging
1
This won't quite work. Shell options (e.g., xtrace, or-xfor short) are not passed from parent to child, so this will only say that the user is runningmyscript.sh, but not what happens in the script. For that you would need one of the following: (1)set -x; . myscript.sh; set +x(probably not a good idea), (2)(set -x; . myscript.sh)(note the parentheses), (3)sh -x myscript.sh, or (4) editmyscript.shand append-xto the she-bang line (the#!/bin/shon the first line).
– G-Man
Feb 10 '15 at 19:51
add a comment |
A shot in the dark:
please edit your question clicking on this link because so it's really difficult to understand.
In general is seems that somewhere in a script (or in a subscript) a variable is not set with a filename.
You can notice from '' without a name inside in your error message
cannot open '' for reading: No such file or directory
You can search where is the error activating the debug in your shell
set -x # to activate debugging
./myscript.sh # here your script invocation
set +x # to stop debugging
A shot in the dark:
please edit your question clicking on this link because so it's really difficult to understand.
In general is seems that somewhere in a script (or in a subscript) a variable is not set with a filename.
You can notice from '' without a name inside in your error message
cannot open '' for reading: No such file or directory
You can search where is the error activating the debug in your shell
set -x # to activate debugging
./myscript.sh # here your script invocation
set +x # to stop debugging
edited Mar 20 '17 at 10:17
Community♦
1
1
answered Feb 9 '15 at 14:07
HasturHastur
13.9k53368
13.9k53368
1
This won't quite work. Shell options (e.g., xtrace, or-xfor short) are not passed from parent to child, so this will only say that the user is runningmyscript.sh, but not what happens in the script. For that you would need one of the following: (1)set -x; . myscript.sh; set +x(probably not a good idea), (2)(set -x; . myscript.sh)(note the parentheses), (3)sh -x myscript.sh, or (4) editmyscript.shand append-xto the she-bang line (the#!/bin/shon the first line).
– G-Man
Feb 10 '15 at 19:51
add a comment |
1
This won't quite work. Shell options (e.g., xtrace, or-xfor short) are not passed from parent to child, so this will only say that the user is runningmyscript.sh, but not what happens in the script. For that you would need one of the following: (1)set -x; . myscript.sh; set +x(probably not a good idea), (2)(set -x; . myscript.sh)(note the parentheses), (3)sh -x myscript.sh, or (4) editmyscript.shand append-xto the she-bang line (the#!/bin/shon the first line).
– G-Man
Feb 10 '15 at 19:51
1
1
This won't quite work. Shell options (e.g., xtrace, or
-x for short) are not passed from parent to child, so this will only say that the user is running myscript.sh, but not what happens in the script. For that you would need one of the following: (1) set -x; . myscript.sh; set +x (probably not a good idea), (2) (set -x; . myscript.sh) (note the parentheses), (3) sh -x myscript.sh, or (4) edit myscript.sh and append -x to the she-bang line (the #!/bin/sh on the first line).– G-Man
Feb 10 '15 at 19:51
This won't quite work. Shell options (e.g., xtrace, or
-x for short) are not passed from parent to child, so this will only say that the user is running myscript.sh, but not what happens in the script. For that you would need one of the following: (1) set -x; . myscript.sh; set +x (probably not a good idea), (2) (set -x; . myscript.sh) (note the parentheses), (3) sh -x myscript.sh, or (4) edit myscript.sh and append -x to the she-bang line (the #!/bin/sh on the first line).– G-Man
Feb 10 '15 at 19:51
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fsuperuser.com%2fquestions%2f875624%2fcannot-open-for-reading-no-such-file-or-directory%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
3
Please edit your question to include the script you are trying to run.
– DavidPostill♦
Feb 9 '15 at 12:34
And provide the result of ls -l command. Also did you arr read permission to the script? They can't work w/o this permission
– Romeo Ninov
Feb 9 '15 at 12:50
What is line 1 of your script. If it's
#!/bin/sh, do you know what/bin/shis on your system (e.g., is it bash or dash)? ... I guess that the134and37in the error message(s) are line numbers. You're probably right not to dump the entire 135+ line script on us, but have you tried deleting lines from (a working, debug copy of) the script until the error goes away? Try that -- the last thing you deleted will probably be a big clue to the problem.– G-Man
Feb 10 '15 at 19:49