Unable to make script executable

Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Unable to make script executable
# 1  
Old 10-24-2009
Unable to make script executable

Hello everybody,
I'm unable to make my shell script an executable file.
The details are as follows:

PATH includes my $HOME/bin i.e. /rchome/rc1/bin
HOME directory is /rchome/rc1
script name is prep_mig.sh permissions set are 755

It's executing if I give below command
sh prep_mig.sh
but not with

Can anybody tell me what the problem might be ?
# 2  
Old 10-24-2009
1. when you execute as ./SCRIPT-NAME there is no need for you worry about the PATH.

2. Only you need to check, permission & she-bang.
It seems you have got permission already right.
What about she-bang ?! Have you given it correctly.

Also, it is good to post the error also, when you say some issue instead of just explaining about it.
# 3  
Old 10-24-2009
Thanks for the response.

When I execute it as follows:
OR simply as
Iget error as:
: No such fileor directory

I've given she-bang as follows:
# 4  
Old 10-24-2009
Are you sure that ksh is in /usr/bin and not /bin?
# 5  
Old 10-24-2009
Hello jp,
Thanks for that suggestion

I've changed that to /bin/ksh
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to make a .exe file executable in Linux?

Dear all, I download a .exe file in my current folder called: ukbmd5.exe. I was told to run the command below: ukbmd5 ukb25278.enc to verify the integrity of the files that you have downloaded and the program ukbmd5 has been made available to assist with decrpying ukb25278.enc. while when I run... (1 Reply)
Discussion started by: forevertl
1 Replies

2. Shell Programming and Scripting

Bash script make itself executable

Is there a way to make this make itself executable? Thanks. :-) cat > somescript.sh << \EOF #!/bin/bash block_count=$(sudo tune2fs -l /dev/sda1 | awk '/^Block count:/ {print $NF}') reserved_block_count=$(sudo tune2fs -l /dev/sda1 | awk '/^Reserved block count:/ {print $NF}') perl -e... (4 Replies)
Discussion started by: drew77
4 Replies

3. UNIX for Beginners Questions & Answers

How to make a dynamically linked executable file?

So I have a file called queens.cc and I need to do the following: Compile and make a .o file while specifying that the compiler is to search /student/214/include for system include files. Use g++, link and load .o file to make a dynamically linked executable file called queens and to also... (1 Reply)
Discussion started by: steezuschrist96
1 Replies

4. UNIX for Dummies Questions & Answers

Command - filename as arguments - make executable to all users.

Edit: Sorry. Mistakenly posted - please delete (3 Replies)
Discussion started by: Reddax
3 Replies

5. Shell Programming and Scripting

Make multiple awk files into an executable

Hello everyone, The following are my input files. The following are my sequence of steps. Can someone please let me know about how to make these bunch of steps into a single script so that I start the script with 1.txt and 2.txt, after execution gives me the final... (11 Replies)
Discussion started by: jacobs.smith
11 Replies

6. Shell Programming and Scripting

Unable to call executable from script

Now I am using the HP-UX11.11 version. The scripts are runninh in KSH shell. While I wan to call one executable of any Pro*C file, I have got the following error, however the executable is running fine directly. testpri Started at 10.05.200923:40 /usr/lib/dld.sl: Bad magic number for... (0 Replies)
Discussion started by: priyankak
0 Replies

7. Shell Programming and Scripting

How to make a script (Bash, KornShell, etc.) executable by mouse clicking?

Hello everybody, Is there any way to make a script (Bash, KornShell, etc.) executable by mouse clicking? For example you have a file myscript.sh, you run: $ chmod u+x myscript.sh Therefore it becomes executable and all you need is to run from the terminal: $./myscript.sh... (2 Replies)
Discussion started by: dariyoosh
2 Replies

8. Shell Programming and Scripting

run and make an executable file

as i said before i'm a beginner in shell programming and i have two questions: how to run an executable file in shell scripts like for example let's say the file called "prog.exe", what's the shell command to run this file? also how can i make the shell file an executable file (if it is... (5 Replies)
Discussion started by: _-_shadow_-_
5 Replies

9. Solaris

How to make a script executable by all users?

I have a script in my home direcroty which upon execution gives the essential system information like memory,cpu etc and is currently owned by root:root. Now I want to see that every non root user will run this file and grab the reqired system info. I know this is some thing associated with chown... (2 Replies)
Discussion started by: chrs0302
2 Replies

10. UNIX for Dummies Questions & Answers

How do I make a cgi script World-executable

I'm trying to set up a form mail script on a website that when Submitted, a cgi script is executed and a perl translator (located in a secured and inaccessible folder) translates the script. After speaking to my hosting provider, I was told to "Telnet into the system and make the script... (2 Replies)
Discussion started by: tylerl
2 Replies
Login or Register to Ask a Question

Featured Tech Videos