• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[solved] Warum starten meine Shell-Skripts nicht?

wenn ich install.sh in der Konsole/Terminal starte, bekomme ich immer die Fehlermeldung:
bash: install.sh: command not found
Das ist mit allen Shell-Skripts so!
Warum? mache ich was falsch?
Suse 10.1
 

towo

Moderator
Teammitglied
weil du ./install.sh aus dem verzeichnis heraus machen mußt, indem das Script install.sh liegt. Außerdem muß es natürlich ausführbar sein. Wenn es das nicht ist, geht auch sh install.sh wobei Du Dich auch hier in dem Verzeichnis befinden mußt.
 
Habe ich schon probiert, selber Fehler!
Das Skript muß ausführbar sein, denn das steht so in der HowTo bzw. Installanleitung
 
/usr/lib/winetools> .install.sh
bash: install.sh: command not found

HowTo:
"unpack it as root to a temporary directory and execute
install.sh
from there.

Aber ich habe dieses Problem bei jeglichen Skripts, nicht nur bei diesem
 
/usr/lib/winetools> ./install.sh
bash: ./install.sh: Datei oder Verzeichnis nicht gefunden

Jawohl, ich habe keinerlei kenntnisse von linux und versuche micht von Howto zu howto durchzuhangeln, leider ist das alles sehr schleppend :-(

und nu?
 
insgesamt 360
drwxr-xr-x 7 root root 4096 2007-01-22 14:28 .
drwxr-xr-x 189 root root 53248 2007-01-22 14:28 ..
drwxr-xr-x 2 root root 4096 2007-01-22 14:28 3rdParty
-rwxr-xr-x 1 root root 203 2005-10-10 21:55 chopctrl.pl
drwxr-xr-x 2 root root 4096 2007-01-22 14:28 doc
-rwxr-xr-x 1 root root 5291 2006-05-02 10:17 findwine
-rwxr-xr-x 1 root root 30 2005-10-10 21:55 gettext.sh.dummy
drwxr-xr-x 2 root root 4096 2007-01-22 14:28 icon
-rwxr-xr-x 1 root root 1691 2005-11-18 14:26 install
-rw-r--r-- 1 root root 1680 2005-11-09 10:09 INSTALL.txt
-rw-r--r-- 1 root root 18011 2005-10-10 21:55 LICENSE.txt
-rwxr-xr-x 1 root root 3333 2005-10-10 21:55 listit
drwxr-xr-x 2 root root 4096 2007-01-22 14:28 po
drwxr-xr-x 2 root root 4096 2007-01-22 14:28 scripts
-rwxr-xr-x 1 root root 626 2005-11-09 10:08 uninstall
-rw-r--r-- 1 root root 3750 2005-11-19 02:12 winetools-mdk.spec
-rw-r--r-- 1 root root 4317 2005-11-19 02:12 winetools.spec
-rwxr-xr-x 1 root root 117794 2006-05-02 10:17 wt0.9jo
-rw-r--r-- 1 root root 10255 2005-11-07 10:11 wt-config.reg
lrwxrwxrwx 1 root root 17 2007-01-22 14:28 Xdialog -> ../../bin/Xdialog
-rwxr-xr-x 1 root root 79036 2005-10-10 21:55 Xdialog.builtin
 

towo

Moderator
Teammitglied
Und?
Dir fällt da nix auf?
Ich sehe da kein install.sh!
Ich sehe da aber ein install!

Nun liegt die Vermutung nahe, daß ein ./install funktionieren könnte.
 
Ja, so gehts!
d.h. auch wenn ich mich im entsprechenden Verzeichnis befinde, muß ich trotzdem vor jeden Befehhl (ausführbare Datei) ein ./ setzen??
Ich muß noch viel lernen :oops:
 
Das ./ besagt, dass du nicht den absoluten Pfad nimmst (Das wäre dann /bla/blubb) sondern relativ zum jetzigen Standort genau das aktuelle Verzeichnis meinst. Ohne ./ würden die Verzeichnisse aus $PATH durchgeorgelt. Aber das steht alles viel ausführlicher in einem Linux-Buch erklärt.
 
Oben