From owner-freebsd-questions@FreeBSD.ORG Sun May 28 20:46:41 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 557B216CF80 for ; Sun, 28 May 2006 20:40:04 +0000 (UTC) (envelope-from axp@shacknet.at) Received: from taro.utanet.at (taro.utanet.at [213.90.36.45]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8D10743D53 for ; Sun, 28 May 2006 20:40:02 +0000 (GMT) (envelope-from axp@shacknet.at) Received: from andrea.utanet.at ([213.90.36.55]) by taro.utanet.at with esmtp (Exim 4.60) (envelope-from ) id 1FkS3N-000106-BC for freebsd-questions@freebsd.org; Sun, 28 May 2006 22:40:01 +0200 Received: from simmu1-67-133.utaonline.at ([62.218.67.133] helo=localhost) by andrea.utanet.at with esmtp (Exim 4.50) id 1FkS3N-0001rf-5r for freebsd-questions@freebsd.org; Sun, 28 May 2006 22:40:01 +0200 Date: Sun, 28 May 2006 22:40:00 +0200 From: "Ferdinand Haselbacher (jr.)" To: freebsd-questions@freebsd.org Message-ID: <20060528204000.GA4341@Hellrazor.bigfatflat> References: <00d601c68254$b814c330$6501a8c0@grant> <1148822083.95778.100.camel@chaucer.jeays.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1148822083.95778.100.camel@chaucer.jeays.ca> X-Accept-Language: en,de X-OS: Linux Hellrazor 2.6.16-rc5hellrazor i686 X-Editor: Vim http://www.vim.org X-GPG-Key: 0xAD85CEE1 User-Agent: mutt-ng/devel-r804 (Debian) Subject: Re: 2>&1 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: Sun, 28 May 2006 20:46:48 -0000 On Sun, May 28, 2006 at 09:14:43AM -0400, Mike Jeays wrote: > On Sun, 2006-05-28 at 08:46 -0400, Grant Peel wrote: > > Hi all, > > > > When using cron, I understand the >/dev/null thing OK, but what exactly does > > >2&1 do? Is it usefull anywhere else? Where might one find ducumentation on > > it? > > > > -Grant > > > > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > It directs both stdout and stderr to /dev/null. Look in 'man bash', or > any tutorial on bash for a more detailed description. Quite confusing > syntax, and a hard-to-remember incantation, IMHO. the trick of the "&" is that the fd (filediscriptor) is kept open and if you redirect fd 1 to a file and fd 2 to file it would get overwritten! one last word to Bash: bash seems to be nice, it is indeed, but for real good and compatible scripting i would recommend you to use plain sh. so far, Ferdinand Haselbacher