LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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, 06: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, 06:26 PM   #2
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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, 06:28 PM   #3
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

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, 09:13 PM   #4
SharpyWarpy
Member
 
Registered: Feb 2003
Location: Florida
Distribution: Fedora 18
Posts: 862

Rep: Reputation: 91
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, 09:20 PM   #5
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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, 07: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, 08:15 AM   #7
MTK358
LQ 5k Club
 
Registered: Sep 2009
Posts: 6,443
Blog Entries: 3

Rep: Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723Reputation: 723
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, 10: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, 10:52 AM   #9
corp769
LQ Guru
 
Registered: Apr 2005
Location: /dev/null
Posts: 5,818

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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



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

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

All times are GMT -5. The time now is 12:11 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
Open Source Consulting | Domain Registration