LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-30-2014, 08:15 PM   #1
abhisheks77
Member
 
Registered: Apr 2014
Posts: 35

Rep: Reputation: Disabled
Not able to execute file, though file exists


I am logged in to server as oracle user and running a script, but it says it doesn't exists. Not sure, why it is complaining. Can somebody help me on this
Code:
oracle@db_serv01:/UPGRADE> ls -l orachk
-rwxr-xr-x 1 oracle dba 1428123 2014-04-30 17:11 orachk
oracle@db_serv01:/UPGRADE> head -2 orachk
#!/bin/env bash
{
oracle@db_serv01:/UPGRADE> ./orachk
-ksh: ./orachk: not found [No such file or directory]
oracle@db_serv01:/UPGRADE> echo $SHELL
/bin/ksh
oracle@db_serv01:/UPGRADE> bash
db_serv01: /UPGRADE
(tty/dev/pts/4): bash: 44 > ./orachk
bash: ./orachk: /bin/env: bad interpreter: No such file or directory
db_serv01: /UPGRADE
(tty/dev/pts/4): bash: 45 >
 
Old 04-30-2014, 09:12 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,404

Rep: Reputation: Disabled
It finds the file just fine, but says /bin/env (the file specified as the script interpreter by the #! line) doesn't exist.
 
1 members found this post helpful.
Old 04-30-2014, 10:54 PM   #3
abhisheks77
Member
 
Registered: Apr 2014
Posts: 35

Original Poster
Rep: Reputation: Disabled
Thanks. I was able to run it after correction in first line. I just added correct path of env
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Bash: No such file or directory, when file actually exists. SkyerSK Linux - Software 13 02-06-2011 05:33 AM
webdav: File exists error while creating new file rdo Linux - Server 3 06-20-2010 12:30 PM
no such file or directory exists when trying to execute a exe ryedawg Linux - Software 5 12-05-2005 06:42 AM
SIOCADDRT: File exists SIOCCADDRT: File Exists Failed to bring up eth0. opsraja Linux - Networking 0 01-10-2005 09:29 AM
Linker problem: can't find a file, but the file exists atlep Programming 5 08-16-2004 07:15 AM


All times are GMT -5. The time now is 03:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration