niXforums Forum Index
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   PreferencesPreferences   Log in to check your private messagesLog in to check your private messages   Log inLog in 
·  nixdoc.net ·  man pages ·  Linux HOWTOs ·  FreeBSD Tips ·  Forums
navigation Forum index » *nix » Linux » Distributions » Suse
How to run .sh file?
Post new topic   Reply to topic Page 1 of 2 [19 Posts] View previous topic :: View next topic
Goto page:  1, 2 Next
Author Message
Andy Beck
*nix forums beginner


Joined: 08 Feb 2005
Posts: 2

PostPosted: Tue Feb 08, 2005 11:00 pm    Post subject: Re: How to run .sh file? Reply with quote

To execute it with "./check.sh" you need to run "chmod u+x check.sh"
"John Scudder" <jscudder@verizon.net> wrote in message
news:bBzNd.14999$s16.7260@trndny02...
Quote:
mjt wrote:
John Scudder wrote:


That method will work only if the file is set as an executable. Without
the file being executable you have to type: 'sh filename.sh'.

"Foxy" <foxy@foxyhole.me.uk> wrote in message
news:87adnRjG_P-g8JjfRVnytQ@pipex.net...


I want to run a file given on Ati website to check which version of x
window
I've got. It's called check.sh. How to run it?


./filename.sh



..... please fix your BROKEN newsreader, John. it's TOP-POSTING

Crap, I had my monitor upside down again.
Back to top
Kevin Nathan
*nix forums Guru


Joined: 24 Mar 2005
Posts: 2026

PostPosted: Tue Feb 08, 2005 2:30 am    Post subject: Re: How to run .sh file? Reply with quote

On Mon, 07 Feb 2005 08:14:53 GMT
"Karl Foley" <karl@thefoleyhouse.co.uk> wrote:

Quote:
lol

Funny how the mind thinks one thing and the hand writes something
else!

Yeah, I get bit by that particular gremlin *way* too often! ;-)


--
Kevin Nathan (Arizona, USA)
Open standards. Open source. Open minds.
The command line is the front line.

Linux 2.6.8-24.11-default
8:30pm up 2 days 8:25, 9 users, load average: 0.39, 0.60, 0.61
Back to top
Brian
*nix forums Guru


Joined: 22 Mar 2005
Posts: 314

PostPosted: Mon Feb 07, 2005 10:22 pm    Post subject: Re: How to run .sh file? Reply with quote

On Mon, 07 Feb 2005 18:46:06 +0000, houghi wrote:

Quote:
Brian wrote:
On Sun, 06 Feb 2005 01:52:41 +0000, Karl Foley wrote:

And also assuming that he has the appropriate binary listed in the
bang hash path...

Given (a) this is a SuSE group and (b) that the question was asked at
all, I think it will... ;)

I have downloaded scripts that had #!/bin/perl. Had to change them first
to #!/usr/bin/perl

Or what about these scripts:
http://accad.osu.edu/~mlewis/Class/Perl/perl.html #!/usr/local/bin/perl
will also not really work well on your standard machine. :-)

Hmm. Well, I can't do better than to quote Karl (a few posts later in

this thread) when he said "Funny how the mind thinks one thing and the
hand writes something else!"

Er, yes, exactly... ;)

B.

--
You never really learn to swear until you learn to drive.
Back to top
houghi
*nix forums Guru


Joined: 22 Feb 2005
Posts: 6233

PostPosted: Mon Feb 07, 2005 5:46 pm    Post subject: Re: How to run .sh file? Reply with quote

Brian wrote:
Quote:
On Sun, 06 Feb 2005 01:52:41 +0000, Karl Foley wrote:

And also assuming that he has the appropriate binary listed in the bang hash
path...

Given (a) this is a SuSE group and (b) that the question was asked at all,
I think it will... Wink

I have downloaded scripts that had #!/bin/perl. Had to change them first
to #!/usr/bin/perl

Or what about these scripts:
http://accad.osu.edu/~mlewis/Class/Perl/perl.html
#!/usr/local/bin/perl will also not really work well on your standard
machine. Smile
--
houghi http://houghi.org
Personally, I think most sports fans are a little "gay". They'd
rather watch a bunch of sweaty guys jumping all over eachother,
than, say fashion TV - where hot models walk down the runway.
Back to top
Karl Foley
*nix forums beginner


Joined: 20 Feb 2005
Posts: 8

PostPosted: Mon Feb 07, 2005 7:14 am    Post subject: Re: How to run .sh file? Reply with quote

"Kevin Nathan" <knathan@project54.com> wrote in message
news:20050205194157.71e20a50@efreet.linux...
Quote:
On Sun, 06 Feb 2005 01:52:41 GMT
"Karl Foley" <karl@thefoleyhouse.co.uk> wrote:

And also assuming that he has the appropriate binary listed in the
bang hash path...

Or hash bang . . . Smile

lol

Funny how the mind thinks one thing and the hand writes something else!
Back to top
John Scudder
*nix forums beginner


Joined: 20 Mar 2005
Posts: 15

PostPosted: Mon Feb 07, 2005 12:35 am    Post subject: Re: How to run .sh file? Reply with quote

mjt wrote:
Quote:
John Scudder wrote:


That method will work only if the file is set as an executable. Without
the file being executable you have to type: 'sh filename.sh'.

"Foxy" <foxy@foxyhole.me.uk> wrote in message
news:87adnRjG_P-g8JjfRVnytQ@pipex.net...


I want to run a file given on Ati website to check which version of x
window
I've got. It's called check.sh. How to run it?


./filename.sh



..... please fix your BROKEN newsreader, John. it's TOP-POSTING

Crap, I had my monitor upside down again.
Back to top
foxy
*nix forums beginner


Joined: 11 Mar 2005
Posts: 39

PostPosted: Sun Feb 06, 2005 10:46 pm    Post subject: Re: How to run .sh file? Reply with quote

Markus Kossmann wrote:


Quote:

I guess you want to run ATIs closed source 8.8.25 driver on your system.
Since you are using a 2.6.10 kernel, you will need patches to get that
driver running. Details see
http://www.rage3d.com/board/showthread.php?t=33798874

Thanks Markus, but what I am supposed to do with this patch. I mean it is
publised as a text, how am I going to apply it?
Back to top
Brian
*nix forums Guru


Joined: 22 Mar 2005
Posts: 314

PostPosted: Sun Feb 06, 2005 10:36 pm    Post subject: Re: How to run .sh file? Reply with quote

On Sun, 06 Feb 2005 01:52:41 +0000, Karl Foley wrote:

Quote:
And also assuming that he has the appropriate binary listed in the bang hash
path...

Given (a) this is a SuSE group and (b) that the question was asked at all,

I think it will... ;)


B.
--
Of all the things I've lost, I miss my mind the most.
Back to top
Markus Kossmann
*nix forums addict


Joined: 26 Feb 2005
Posts: 62

PostPosted: Sun Feb 06, 2005 5:12 pm    Post subject: Re: How to run .sh file? Reply with quote

Foxy wrote:

Quote:
Foxy wrote:

I want to run a file given on Ati website to check which version of x
window I've got. It's called check.sh. How to run it?

./check.sh gives me:

bash: ./check.sh: /bin/bash: bad interpreter: Permission denied

The filesystem, which contains check.sh is probably mounted with the
(default) noexec option

Quote:

sh check.sh:

=====================================================================
ATI Technologies
=====================================================================
Your possibly not running this script from the console
or maybe you simply dont have the console ownership.
Unable to determine XFree86 Version. Stopping now.

I ran X -version and got

This is a pre-release version of the The X.Org Foundation X11.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the The X.Org Foundation "monolithic tree" CVS
repository hosted at http://www.freedesktop.org/Software/xorg/
X Window System Version 6.8.1.902 (6.8.2 RC 2)
Release Date: 12 January 2005
X Protocol Version 11, Revision 0, Release 6.8.1.902
Build Operating System: SuSE Linux [ELF] SuSE
Current Operating System: Linux linux
2.6.10-200501110740260000-default #1 Tue Jan 11 07:40:26 UTC 2005 i686
Build Date: 13 January 2005
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present

Does it mean that I've got X.org not XFree86?

Yes; most linux distributions have switched to Xorg nowadays.

I guess you want to run ATIs closed source 8.8.25 driver on your system.
Since you are using a 2.6.10 kernel, you will need patches to get that
driver running. Details see
http://www.rage3d.com/board/showthread.php?t=33798874
Back to top
foxy
*nix forums beginner


Joined: 11 Mar 2005
Posts: 39

PostPosted: Sun Feb 06, 2005 4:36 pm    Post subject: Re: How to run .sh file? Reply with quote

Foxy wrote:

Quote:
I want to run a file given on Ati website to check which version of x
window I've got. It's called check.sh. How to run it?

../check.sh gives me:

bash: ./check.sh: /bin/bash: bad interpreter: Permission denied

sh check.sh:

=====================================================================
ATI Technologies
=====================================================================
Your possibly not running this script from the console
or maybe you simply dont have the console ownership.
Unable to determine XFree86 Version. Stopping now.

I ran X -version and got

This is a pre-release version of the The X.Org Foundation X11.
It is not supported in any way.
Bugs may be filed in the bugzilla at http://bugs.freedesktop.org/.
Select the "xorg" product for bugs you find in this release.
Before reporting bugs in pre-release versions please check the
latest version in the The X.Org Foundation "monolithic tree" CVS
repository hosted at http://www.freedesktop.org/Software/xorg/
X Window System Version 6.8.1.902 (6.8.2 RC 2)
Release Date: 12 January 2005
X Protocol Version 11, Revision 0, Release 6.8.1.902
Build Operating System: SuSE Linux [ELF] SuSE
Current Operating System: Linux linux 2.6.10-200501110740260000-default #1
Tue Jan 11 07:40:26 UTC 2005 i686
Build Date: 13 January 2005
Before reporting problems, check http://wiki.X.Org
to make sure that you have the latest version.
Module Loader present

Does it mean that I've got X.org not XFree86?
Back to top
TGGA
*nix forums Guru Wannabe


Joined: 19 Feb 2005
Posts: 126

PostPosted: Sun Feb 06, 2005 10:06 am    Post subject: Re: How to run .sh file? Reply with quote

In a fit of insane speed typing Foxy managed to fluently type::

Quote:
I want to run a file given on Ati website to check which version of x
window I've got. It's called check.sh. How to run it?

chmod 700 check.sh
../check.sh
Back to top
houghi
*nix forums Guru


Joined: 22 Feb 2005
Posts: 6233

PostPosted: Sun Feb 06, 2005 10:01 am    Post subject: Re: How to run .sh file? Reply with quote

Kevin Nathan wrote:
Quote:
On Sun, 06 Feb 2005 01:52:41 GMT
"Karl Foley" <karl@thefoleyhouse.co.uk> wrote:

And also assuming that he has the appropriate binary listed in the
bang hash path...

Or hash bang . . . Smile

http://www.tldp.org/LDP/abs/html/sha-bang.html
#! can be omitted if the script consists only of a set of generic system
commands, using no internal shell directives.

Nice one is:
#!/bin/rm
# Self-deleting script.
# Nothing much seems to happen when you run this... except that the file
# disappears.
WHATEVER=65
echo "This line will never print (betcha!)."
exit $WHATEVER # Doesn't matter. The script will not exit here.

Or:
Try starting a README file with a #!/bin/more, and making it executable.
The result is a self-listing documentation file.
--
houghi http://houghi.org
Personally, I think most sports fans are a little "gay". They'd
rather watch a bunch of sweaty guys jumping all over eachother,
than, say fashion TV - where hot models walk down the runway.
Back to top
Kevin Nathan
*nix forums Guru


Joined: 24 Mar 2005
Posts: 2026

PostPosted: Sun Feb 06, 2005 1:41 am    Post subject: Re: How to run .sh file? Reply with quote

On Sun, 06 Feb 2005 01:52:41 GMT
"Karl Foley" <karl@thefoleyhouse.co.uk> wrote:

Quote:
And also assuming that he has the appropriate binary listed in the
bang hash path...

Or hash bang . . . :-)


--
Kevin Nathan (Arizona, USA)
Open standards. Open source. Open minds.
The command line is the front line.

Linux 2.6.8-24.11-default
7:41pm up 7:37, 8 users, load average: 0.74, 0.48, 0.45
Back to top
mjt
*nix forums Guru


Joined: 09 Mar 2005
Posts: 961

PostPosted: Sun Feb 06, 2005 12:57 am    Post subject: Re: How to run .sh file? Reply with quote

John Scudder wrote:

Quote:
That method will work only if the file is set as an executable. Without
the file being executable you have to type: 'sh filename.sh'.
"Foxy" <foxy@foxyhole.me.uk> wrote in message
news:87adnRjG_P-g8JjfRVnytQ@pipex.net...

I want to run a file given on Ati website to check which version of x
window
I've got. It's called check.sh. How to run it?


./filename.sh


...... please fix your BROKEN newsreader, John. it's TOP-POSTING
--
<< http://michaeljtobler.homelinux.com/ >>
Consultants are mystical people who ask a company
for a number and then give it back to them.
Back to top
Karl Foley
*nix forums beginner


Joined: 20 Feb 2005
Posts: 8

PostPosted: Sun Feb 06, 2005 12:52 am    Post subject: Re: How to run .sh file? Reply with quote

Quote:
I want to run a file given on Ati website to check which version of x
window I've got. It's called check.sh. How to run it?

./filename.sh

Assuming it has executable permissions set, of course...
If not then set it so with: chmod +x check.sh or just do: sh ./check.sh

And also assuming that he has the appropriate binary listed in the bang hash
path...
Back to top
Google

Back to top
Display posts from previous:   
Post new topic   Reply to topic Page 1 of 2 [19 Posts] Goto page:  1, 2 Next
View previous topic :: View next topic
The time now is Thu Jan 08, 2009 6:38 pm | All times are GMT
navigation Forum index » *nix » Linux » Distributions » Suse
Jump to:  

Similar Topics
Topic Author Forum Replies Last Post
No new posts Running php file everyday on scheduled time sachin PHP 1 Fri Jul 21, 2006 12:49 pm
No new posts Regarding thesaurus iso file Srikanth modules 0 Fri Jul 21, 2006 10:42 am
No new posts how can i get a file descriptor not used? mars system 0 Fri Jul 21, 2006 7:41 am
No new posts small GTK "Open file" dialog David Siroky Debian 0 Fri Jul 21, 2006 7:30 am
No new posts Trouble Declaring 3D Array in Header File free2klim C++ 1 Fri Jul 21, 2006 4:07 am

Ken Follet | Debt Consolidation | Loans | Watch Naruto Online | Debt Consolidation
Copyright © 2004-2005 DeniX Solutions SRL
 
Other DeniX Solutions sites: Unix/Linux blog |  electronics forum |  medicine forum |  science forum | 
Privacy Policy


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.3877s ][ Queries: 16 (0.2405s) ][ GZIP on - Debug on ]