Frank Schönmann: Kornshell externe Dateien includiren

Beitrag lesen

hi!

Wie kann ich unter Kornshell externe Dateien includieren
ich will meine HTML kopf datei includiren. wie z.B mit SSI
<!--#include virtual="kopf.shtml" -->
und ist die Kopfseite schon includiert aber wenn ich den gleichen Sytax
mit meinen kornshell script mit echo ausgebe, wird SSI nicht
interpretiert.

Ich hab kein Wort verstanden. Aber falls du in einem ksh-Skript ein anderes
ksh-Skript ausführen möchtest, solltest du dir mal die man-Page anschauen:

  • . name [ arg ... ]
           If name is a function defined with the  function  name  reserved
           word syntax, the function is executed in the current environment
           (as if it had been defined with the name()  syntax.)   Otherwise
           if  name  refers to a file, the file is read in its entirety and
           the commands are executed in the current shell environment.  The
           search path specified by PATH is used to find the directory con-
           taining the file.  If any arguments arg are given,  they  become
           the  positional  parameters  while processing the .  command and
           the original positional parameters are restored upon completion.
           Otherwise  the  positional  parameters  are unchanged.  The exit
           status is the exit status of the last command executed.

[...]

  • exec [ -c ] [ -a name ] [ arg ... ]
           If  arg is given, the command specified by the arguments is exe-
           cuted in place of this shell without  creating  a  new  process.
           The -c option causes the environment to be cleared before apply-
           ing variable assignments associated with  the  exec  invocation.
           The  -a  option causes name rather than the first arg, to become
           argv[0] for the new process.  Input/output arguments may  appear
           and affect the current process.  If arg is not given, the effect
           of this command is to modify file descriptors as  prescribed  by
           the  input/output  redirection  list.   In  this  case, any file
           descriptor numbers greater than 2  that  are  opened  with  this
           mechanism are closed when invoking another program.

Und falls du was anderes wissen willst, solltest du dich klarer ausdrücken.

bye, Frank!

--
Never argue with an idiot. He will lower you to his level and then
beat you with experience.