From owner-freebsd-questions@FreeBSD.ORG Thu Jun 4 14:06:23 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9ABF4106566C for ; Thu, 4 Jun 2009 14:06:23 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.103.93]) by mx1.freebsd.org (Postfix) with ESMTP id 525668FC27 for ; Thu, 4 Jun 2009 14:06:23 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.14.2/8.13.8) with ESMTP id n54E6Fts006668 for ; Thu, 4 Jun 2009 09:06:15 -0500 (CDT) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <200906041406.n54E6Fts006668@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <6666.1244124375.1@dc.cis.okstate.edu> Date: Thu, 04 Jun 2009 09:06:15 -0500 From: Martin McCormick Subject: Can a Bourn Shell Script put itself in the background? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Jun 2009 14:06:23 -0000 I tried bg $$ but $$ is the current process invoked just as $! is the process of a backgrounded process started by that shell. So, can I make a shell script background itself after starting? Right now, I remind my coworkers to append the & after the script name. the bg command expects a job number, not a process ID. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group