LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 09-20-2009, 03:14 PM   #1
jonbvgood
Member
 
Registered: Sep 2007
Location: SW, UK
Distribution: Kubuntu 10.10 and Crunchbang
Posts: 46

Rep: Reputation: 18
loading a new program using .sh


Despite being a newbie for a while I seem to have completely forgotten how to load this type of file. When typing ./so- .sh even when using the sudo command i get the prompt
"Command not found"
using ls the file is within the directory i am using

I am using easy-peasy for a asus eeepc netbook

any suggestions?
 
Old 09-20-2009, 04:07 PM   #2
Hi_This_is_Dev
Member
 
Registered: May 2009
Location: India
Distribution: On my PC I use RHEL, at office AIX, Solaris, HP-UX, RHEL.
Posts: 254

Rep: Reputation: 18
cd to that directory and then at the shell prompt give this command:

Code:
ls -l
Copy and paste the contents in your post. Highlight the file you want to run/execute.

Here's an example:

Code:
#cd bin

#vi myScript.sh
<Press I to go in Insert Mode>

echo "myScript.sh - by Dev"
echo "Displaying Directory Contents..."
ls -l
echo "**THANKS***

<Press Esc and Shift + : to go in Command Mode and Type>

:wq <Press Enter to Save and Quit>

#chmod u+x myScript.sh
#./myScript.sh
Note: What is stated between < and > is not be typed in the program itself. I guess you already know it.

Note: You might not have given "execute permission" to your script file which also causes the error message to be displayed: Command not found
 
  


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
Problem loading a Program in Wine SWnerd525 Linux - Newbie 2 08-27-2007 07:59 PM
Error Loading Program Into Memory Kumarrrr Mandriva 2 07-31-2005 06:18 AM
loading a program on startup masonmop Ubuntu 1 07-29-2005 08:49 AM
program loading times kibitzer99 Linux - Software 1 01-24-2005 12:03 PM
Loading a program at startup? vincebs Linux - Software 5 04-19-2004 11:52 AM


All times are GMT -5. The time now is 12:40 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