Mailinglist Archive: opensuse (2488 mails)
| < Previous | Next > |
Re: [opensuse] Installation methods
- From: "Rajko M." <rmatov101@xxxxxxxxxxx>
- Date: Sun, 4 Feb 2007 19:59:40 -0600
- Message-id: <200702041959.40707.rmatov101@xxxxxxxxxxx>
On Sunday 04 February 2007 17:46, Charles R. Buchanan wrote:
...
> I downloaded a script yesterday. It was a script to check settings or
> something or other for the ati card that I have installed. Tried to run
> the script and even that didn't work. So I should have ran "chmod 777
> (or 555) as Ken has stated in his post?
>
> I also ran the chmod command for yet another program I was attempting to
> install and that didn't work as well. I would feel like a heel if I was
> just guessing at this stuff, but I just did what the instructions on the
> website said to do. <shrug>
Anders example:
bash scriptname.sh
is in openSUSE equivalent to
sh scriptname.sh
in instructions on nVidia web site as sh is only symlink to bash.
Calling direct bash is faster, which is here not so important because that is
only one call, but shows good programmer habit to avoid way around.
Yet another method to run any file as executable script:
. filename
Above is pulled out of scripts that booting and setting up the system.
Note that there is at least one blank between, which is different from
.filename
that has no space between and means hidden file for normal
ls
command.
For both methods it is not important that it has executable permissions set,
or to have extension .sh.
Example:
It was created file irun with single command
echo I am running
Executable permissions are not set.
rajko@linux:~> ll irun
-rw-r--r-- 1 rajko users 18 2007-02-04 19:07 irun
Run using sh or bash:
rajko@linux:~> sh irun
I am running
rajko@linux:~> . irun
I am running
rajko@linux:~> . irun
I am running
While
rajko@linux:~> ./irun
bash: ./irun: Permission denied
fails because file has no executable permissions set.
HTH
--
Regards, Rajko.
http://en.opensuse.org/Portal
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
...
> I downloaded a script yesterday. It was a script to check settings or
> something or other for the ati card that I have installed. Tried to run
> the script and even that didn't work. So I should have ran "chmod 777
> (or 555) as Ken has stated in his post?
>
> I also ran the chmod command for yet another program I was attempting to
> install and that didn't work as well. I would feel like a heel if I was
> just guessing at this stuff, but I just did what the instructions on the
> website said to do. <shrug>
Anders example:
bash scriptname.sh
is in openSUSE equivalent to
sh scriptname.sh
in instructions on nVidia web site as sh is only symlink to bash.
Calling direct bash is faster, which is here not so important because that is
only one call, but shows good programmer habit to avoid way around.
Yet another method to run any file as executable script:
. filename
Above is pulled out of scripts that booting and setting up the system.
Note that there is at least one blank between, which is different from
.filename
that has no space between and means hidden file for normal
ls
command.
For both methods it is not important that it has executable permissions set,
or to have extension .sh.
Example:
It was created file irun with single command
echo I am running
Executable permissions are not set.
rajko@linux:~> ll irun
-rw-r--r-- 1 rajko users 18 2007-02-04 19:07 irun
Run using sh or bash:
rajko@linux:~> sh irun
I am running
rajko@linux:~> . irun
I am running
rajko@linux:~> . irun
I am running
While
rajko@linux:~> ./irun
bash: ./irun: Permission denied
fails because file has no executable permissions set.
HTH
--
Regards, Rajko.
http://en.opensuse.org/Portal
--
To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx
| < Previous | Next > |