LinuxQuestions.org
Review your favorite Linux distribution.
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 12-26-2010, 02:29 AM   #16
wang
Member
 
Registered: Dec 2010
Distribution: ubuntu 10.04
Posts: 43

Original Poster
Rep: Reputation: 0

Quote:
Originally Posted by crts View Post
Ok,

please start using CODE tags! Catkin gave you failproof instructions on how to accomplish that. See also my signature.

As for your problem, answer the following questions first:
- Are those really the exact errors that get printed? They should look more like
Code:
./5: line 5: let: command not found
- Are you 100% sure that the scripts are called from within a bash-shell?
- Is your very first line indeed the shebang ( and not, e.g. emtpy)?
- Are you using some sort of 'funny' editor that does precede your lines with line-numbers?
- What does your PATH environment variable look like?

well, 1:those are really the exact errors that get printed(100% sure)
2:the scripts are called from within a bash-shell (99.99% sure)
3:my very first line is indeed the "#!/bin/bash" (99.98% sure)
4:i was using the gedit Text Editor to create the scripts (with no line-number) (99.97% sure)
5:wang@wang-laptop:~$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games (100% sure)
Again, sorry for troubling you! thanks! (200% sure)
 
Old 12-26-2010, 04:09 AM   #17
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
It would be helpful if you could copy from your command line sessions and paste into your posts in this thread (using CODE tags). That is a powerful technique to easily let us see exactly what is happening. If you do not know how to do that, please ask.
 
Old 12-26-2010, 05:02 AM   #18
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,566

Rep: Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901Reputation: 2901
Another point we may have missed ... please show the output of:
Code:
ls -l /bin/bash
Maybe bash is no longer in your bin directory??
 
  


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] Why does perl execute bash scripts? zensunni Linux - Newbie 3 11-13-2010 04:24 PM
Another simple question - cannot execute scripts Stevie-B-242 Linux - Newbie 3 02-18-2008 05:53 AM
how to execute bash scripts from C????? :( cho Programming 2 06-19-2005 08:15 PM
Unable to execute sh scripts zowey Mandriva 2 12-23-2004 04:59 PM
execute bash scripts vapor Programming 9 07-14-2003 03:54 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:24 AM.

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