Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Forum Archive > Absolute Beginner Talk
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.

Absolute Beginner Talk
The perfect starting place to find out more about computers, Linux and Ubuntu.

 
Thread Tools Display Modes
Old September 8th, 2006   #1
crunchystrike
Just Give Me the Beans!
 
Join Date: Sep 2006
Beans: 50
what do I do with SH files?

Hello, i have downloaded 2 .sh files and I am wondering how I can use them. here are my questions:

1. What type of file is it
2. what is is used for
3. how can i open it or execute it
crunchystrike is offline   Reply With Quote
Old September 8th, 2006   #2
encompass
Fresh Brewed Ubuntu
 
encompass's Avatar
 
Join Date: Nov 2005
Location: Finland, Oulu
Beans: 1,493
Ubuntu 9.10 Karmic Koala
Send a message via ICQ to encompass Send a message via AIM to encompass Send a message via MSN to encompass Send a message via Yahoo to encompass Send a message via Skype™ to encompass
Smile Re: what do I do with SH files?

shel script is the type if I am not mistaken.
you can run them from the terminal.
./<filename>
If that does not work... make it executable first by doing..
chmod +x <filename>
what files are they?
__________________
Like my avatar? Help us make more and your own! http://launchpad.net/memaker
Book of Mormon-MP3 or BOOK
"Microsoft is open-source friendly in the same way that a butcher is friendly to a cow." -- This Guy
encompass is offline   Reply With Quote
Old September 8th, 2006   #3
amo-ej1
Dipped in Ubuntu
 
amo-ej1's Avatar
 
Join Date: Aug 2006
Location: Belgium
My beans are hidden!
Xubuntu 8.04 Hardy Heron
Re: what do I do with SH files?

Files with a .sh extension are shell script, they are simply a combination of shell logic. (you can compare them with dos .bat files). To view their contents, simply open them in a text editor. Most likely it's an auto installer of some kind (java ?, nvidia driver ?, a linux game ?). These auto installers typically contain a piece of shellcode to do the installation followed by the zip file with some logic do verify the checksum. So if you want to know what they do (and you're not scared from some shell command open them in a text editor).

In order to execute them (simply use them). You can open a console, cd to the right directory and run chmod +x file.sh (this sets the execute flag, which probably isn't there if you downloaded it from some place and then you can execute it using ./file.sh (you need the ./ because the current directory isn't in your $PATH).

Another option is simply execut sh /path/to/file.sh in this case you don't need to set the execute bit.
amo-ej1 is offline   Reply With Quote

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 12:25 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry