[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [TEKNIK] fg i script



Jesper K. Pedersen wrote:
On Sat, 30 Jun 2007 14:11:51 +0000
Jørgen Heesche <sslug@sslug> wrote:

Atte André Jensen wrote:
Hejsa

Jeg vil gerne gøre følgende

#!/bin/bash
program_a &
sleep 1
program_b
fg

Men jeg får at vide at
/home/atte/bin/script: line 5: fg: no job control

Hvordan får jeg program_a i forgrunden igen?

fg kan ikke bruges i et script.
Kommandoen fg bruges i en x-terminal til at kalde det sidste job, man fra terminalen startede i baggrunden, frem i forgrunden.
Man kan også kalde et ældre baggrundsjob frem med kommandoen 'fg
jobid'. Kommandoen bg viser alle baggrundsjob der er stoppet med
kommandoen stop eller startet i baggrunden med &.



Kommandoen "fg" har intet at gøre med en binding til X. fg er om noget mere en kommandolinie ting som kan bruges hvis du har flere programmer kørende som skal skifte standard io engang imellem.

Ja, fg er en jobkontrol kommamdo, og bruges fra kommandolinien,
Læs om 'Jobs - the basics of job control' her: http://linuxreviews.org/beginner/jobs/


--
Med venlig hilsen

Jørgen Heesche
mailto:sslug@sslug


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2007-07-01, 02:02 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *