PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Forums Hébergement > Forum Serveur - Sécurité et techniques > comp.unix.shell > Re: nohup and sourcing
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
comp.unix.shell Using and programming the Unix shell.

Re: nohup and sourcing

Réponse
 
LinkBack Outils de la discussion
Vieux 18/08/2006, 08h04   #1
Jerry Fleming
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: nohup and sourcing

Marty W wrote:
> Hi there.
>
> I'm using Solaris 9 and my default shell is ksh.
> I have a script called start.sh which contains (basically)
>
> source config.sh
> java program
>
> So when i execute the start.sh script, it works fine.
> But, when I try to run the script through nohup like
>
> nohup start.sh &
>
> It fails as I get the error
>
> source: not found
>
> Does this have something to do with not being in the csh environment ?
> Is there a way to get this to work without changing the script ?
>
> Thanks,
>
> Marty
>

I think you should give the absolute path of config.sh to source. It is
the same if you want to run something with nohup. Because they were run
in the background and therefore, do not have your pwd.
-Jerry Fleming
  Réponse avec citation
Vieux 18/08/2006, 11h08   #2
Bill Marcum
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: nohup and sourcing

On Fri, 18 Aug 2006 15:04:07 +0800, Jerry Fleming
<jerry@dd.comlk> will write:
>
> I think you should give the absolute path of config.sh to source. It is
> the same if you want to run something with nohup. Because they were run
> in the background and therefore, do not have your pwd.
> -Jerry Fleming


"source" is not a builtin command in ksh. Change the first line of the
script to "#!/bin/csh" or "#!/bin/bash".


--
Wedding rings are the world's smallest handcuffs.
  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h15.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,08705 seconds with 10 queries