Wie kann ich ein Script starten (*.sh)

SkyMaster

schläft auf dem Boardsofa
Hallo

Ich muss für ein Update ein Script starten.

Das File hat die endung "sh"

Wie kann ich dieses Script von der Shell aus starten
(Sorry bin absoluter Newbie und habe Null Ahnungt)

Gruß
Sky
 
Ist nicht hunderprozentig richtig. So wie KillerKuno es sagt funktioniert es nur nur, wenn das Skript zum einen ausführbar (also +x) ist und in der ersten Zeile des Skriptes
!#/bin/sh
steht.

Ansonsten führt man Shellskripte mittels
sh Shellskript.sh
aus.
 
also es ist -x und NICHT +X

Das script lautet wie Folgt (inhalt)
#!/bin/sh

######## Confixx(R) 2.0 Professional
#### Copyright Yippi-Yeah! E-Business GmbH 2001-2003
######## http://www.confixx.de - info@yippi-yeah.com

if ((test "X$1" != "X") && (test -d "$1")); then

BASE=$1

echo ""
perl $BASE/admin/subs/modules_install.pl
echo ""
perl $BASE/admin/updates/db_update.pl
echo ""
perl $BASE/admin/updates/files_update.pl
echo ""
perl $BASE/admin/subs/scripts_install.pl
echo ""
perl $BASE/admin/subs/webPages_install.pl
echo ""

if (test -e "$BASE/admin/subs/cgis_install.pl"); then
perl $BASE/admin/subs/cgis_install.pl
echo ""
fi

fi

und wenn ich es Mit ./ include_update.sh oder Sh include_update.sh ausführe, passier rein Gar nix :(
(keine Meldunf oder ähliches....

Shit
 
Code:
cd /pfad/zu/deinem/script
chmod a+rx deinscript.sh
./deinscript.sh

das mit dem If passt glaube ich nicht ganz.
Probier's mal so:
Code:
#!/bin/sh

######## Confixx(R) 2.0 Professional
#### Copyright Yippi-Yeah! E-Business GmbH 2001-2003
######## [url]http://www.confixx.de[/url] - [email]info@yippi-yeah.com[/email]

if test "X$1" != "X" && test -d "$1" ; then

   BASE=$1
   echo ""; perl $BASE/admin/subs/modules_install.pl
   echo ""; perl $BASE/admin/updates/db_update.pl
   echo ""; perl $BASE/admin/updates/files_update.pl
   echo ""; perl $BASE/admin/subs/scripts_install.pl
   echo ""; perl $BASE/admin/subs/webPages_install.pl
   echo ""
   if test -e "$BASE/admin/subs/cgis_install.pl" ; then
      perl $BASE/admin/subs/cgis_install.pl
      echo ""
   fi
fi

Gruß
Tobias
 
Oben