[ LUGOS ] csh -> bash

Jure Koren jure na kiss.uni-lj.si
Sob Nov 11 00:01:16 CET 2000


On Fri, Nov 10, 2000 at 09:05:06PM +0100, ike na email.si wrote:
> 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?

Ce je csh (ponavadi tcsh) instaliran, in ga lahko pozenes na roke,
potem samo prvo vrstico spremeni v #!/bin/tcsh.

> ©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
> 

-- 
Jure Koren                      |                       unix administrator
jure na kiss.uni-lj.si             |             gnu/Linux software developer




Dodatne informacije o seznamu Starilist