[ LUGOS ] csh -> bash

ike na email.si ike na email.si
Pet Nov 10 21:05:06 CET 2000


Re,

Ja, namestitev csh shella na mašini je ena izmed 
možnih rešitev in root-u sem že zagnjavil. Ali vseeno 
me zanima: katere vrstice moram v skripti spremeniti, 
da bo delala tudi pod bashom?

©e enkrat source:
---
#!/bin/csh

set self=$0
if ($self:h == $self) then
  setenv IDSS_HOME $PWD
else if ($self !~ /*) then
  if ($?LD_LIBRARY_PATH) then
    setenv LD_LIBRARY_PATH ${IDSS_HOME}:
$LD_LIBRARY_PATH
  else
    setenv LD_LIBRARY_PATH ${IDSS_HOME}
  endif
  if ("$1" == "-init") then
    $IDSS_HOME/idss $*
    exit
  endif
  set pidfile=$IDSS_HOME/Logs/idss.pid
  if (-e $pidfile) then
    set pid=`cat $pidfile`
    /bin/sh -c "kill -0 $pid 2> /dev/null"
    if ($status == 0) then
      echo IDS Server \(PID $pid\) is already running.
      exit
    endif
    rm $pidfile
  endif
  if ("$1" == "-con") then
    $IDSS_HOME/idss $*
  else
    echo IDSS_HOME=$IDSS_HOME
    $IDSS_HOME/idss $*
    sleep 1s
    if (!(-e $pidfile)) then
      sleep 2s
      if (!(-e $pidfile)) then
        echo Server failed to start.
        exit
      endif
    endif
    set pid=`cat $pidfile`
    echo IDS Server \(PID $pid\) is started.
  endif
---END SOURCE---
 
©e error message pod bashom:
 
$ ./runserver
runserver: line 63: syntax error: 
unexpected end of file 
 
Ima kdo kako idejo?
 
tnx in lp,
-Igor

-----
Na koncu vedno zmaga pravica. A mi smo sele na začetku.

-------------------
http://www.email.si




Dodatne informacije o seznamu Starilist