LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 08-09-2011, 07:19 PM   #1
PBIteach
LQ Newbie
 
Registered: Aug 2011
Location: Idaho, USA
Distribution: Ubuntu 11.10
Posts: 14

Rep: Reputation: Disabled
Running .sh programs, which application do I use?


I downloaded indexing_unix_3_9_9.sh on my Mini 9 from https://indexing.familysearch.org/ne...getstarted.jsf .
I tried to open the file using the Text Editor but got an error message--gedit has not been able to detect the character encoding.
Please check that you are not trying to open a binary file.
Select a character encoding from the menu and try again.
So I tried a different application--File Browser--but got another error message--The location is not a folder.
Being new to Unix, I am at a loss.
 
Old 08-09-2011, 07:26 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Hello,

After you download it, you need to chmod the file in order to execute it. Perform the following on the file:
Code:
chmod +x indexing_unix_3_9_9.sh
After that, you can then run the file, like so:
Code:
./indexing_unix_3_9_9.sh
Cheers,

Josh
 
1 members found this post helpful.
Old 08-09-2011, 07:28 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,838

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
.sh programs can be run from a terminal or right-clicking on it in file manager & selecting command from drop down list.
http://www.cyberciti.biz/faq/run-exe...-shell-script/
 
Old 08-09-2011, 10:13 PM   #4
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 90
It's hard to tell if you want to run the shell script or edit it. Opening it with a text editor like gedit implies you want to edit or look at it before you run it. Am I correct? The errors stated by gedit indicate it is a binary file because shell scripts are text, not binary. So there should be no binary characters in the script. Try another text editor. Or you could even try a text VIEWER like the command line text viewer "less". Just open a terminal and type "less filename".
 
Old 08-09-2011, 10:20 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by SharpyWarpy View Post
It's hard to tell if you want to run the shell script or edit it. Opening it with a text editor like gedit implies you want to edit or look at it before you run it. Am I correct? The errors stated by gedit indicate it is a binary file because shell scripts are text, not binary. So there should be no binary characters in the script. Try another text editor. Or you could even try a text VIEWER like the command line text viewer "less". Just open a terminal and type "less filename".
The file that the OP has downloaded is a shell script, merged with the closed-source binaries that are attached to the file. It wouldn't matter though, because the OP still needs to chmod the file executable in order to execute it properly from the command line. Hence, why he has gotten the error messages that he did - A shell script CAN have "binary" coding in it.
 
Old 08-10-2011, 08:26 AM   #6
PBIteach
LQ Newbie
 
Registered: Aug 2011
Location: Idaho, USA
Distribution: Ubuntu 11.10
Posts: 14

Original Poster
Rep: Reputation: Disabled
I ran the chmod +x Indexing_unix_3_9_9.sh and the error comes back "cannot access 'Indexing_unix_3_9_9.sh': No such file or directory"
 
Old 08-10-2011, 09:15 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720Reputation: 720
Quote:
Originally Posted by PBIteach View Post
I ran the chmod +x Indexing_unix_3_9_9.sh and the error comes back "cannot access 'Indexing_unix_3_9_9.sh': No such file or directory"
That means that the file isn't in the directory where you ran the command. Did you mistype the file's name, or forget to cd to the proper directory first?
 
Old 08-11-2011, 11:14 AM   #8
PBIteach
LQ Newbie
 
Registered: Aug 2011
Location: Idaho, USA
Distribution: Ubuntu 11.10
Posts: 14

Original Poster
Rep: Reputation: Disabled
I found that I had to cd Downloads then bash file.sh. Thanks for your help.
I am learning.
 
Old 08-11-2011, 11:52 AM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by PBIteach View Post
I found that I had to cd Downloads then bash file.sh. Thanks for your help.
I am learning.
You found out that you had to? Or, did you read the previous post on what to do?

And since you had your questions answered, please mark your thread as solved, using the thread tools located at the top of the page.

Cheers,

Josh
 
  


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
distributed Linux Application Programs JimHughen Linux - General 4 06-30-2009 12:35 AM
Need gui wrapper and programs for application to capture live video and audio JOnkka Programming 2 04-13-2009 08:03 AM
Manually add programs into the Gnome Application Browser in 10.2 Hawky SUSE / openSUSE 2 02-22-2007 06:23 PM
Programs not showing up on the Application Menu in Mandrake double_j Linux - Newbie 2 01-19-2006 03:34 AM
How to apply patches for application programs? ganninu Linux - General 3 10-22-2003 02:04 PM


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