From owner-freebsd-questions@FreeBSD.ORG Tue Jun 16 14:54:24 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 14771106566C for ; Tue, 16 Jun 2009 14:54:24 +0000 (UTC) (envelope-from carmel_ny@hotmail.com) Received: from blu0-omc4-s32.blu0.hotmail.com (blu0-omc4-s32.blu0.hotmail.com [65.55.111.171]) by mx1.freebsd.org (Postfix) with ESMTP id BA75A8FC18 for ; Tue, 16 Jun 2009 14:54:23 +0000 (UTC) (envelope-from carmel_ny@hotmail.com) Received: from BLU0-SMTP18 ([65.55.111.136]) by blu0-omc4-s32.blu0.hotmail.com with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Jun 2009 07:54:23 -0700 X-Originating-IP: [76.23.177.172] X-Originating-Email: [carmel_ny@hotmail.com] Message-ID: Received: from scorpio.seibercom.net ([76.23.177.172]) by BLU0-SMTP18.blu0.hotmail.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Tue, 16 Jun 2009 07:54:22 -0700 Received: from scorpio.seibercom.net (localhost [127.0.0.1]) (Authenticated sender: carmel_ny@hotmail.com) by scorpio.seibercom.net (Postfix) with ESMTPA id 6BFC72298D for ; Tue, 16 Jun 2009 10:54:21 -0400 (EDT) Received: from scorpio.seibercom.net (localhost [127.0.0.1]) (Authenticated sender: carmel_ny@hotmail.com) by scorpio.seibercom.net (Postfix) with ESMTPA id 2C3D12297D for ; Tue, 16 Jun 2009 10:54:21 -0400 (EDT) Date: Tue, 16 Jun 2009 10:54:20 -0400 From: Carmel NY To: freebsd-questions@freebsd.org In-Reply-To: <20090616135615.GA18052@marge.bs.l> References: <20090616135615.GA18052@marge.bs.l> Organization: seibercom.net X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.2; i386-portbld-freebsd7.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: "\j?x](l|]4p?-1Bf@!wN<&p=$.}^k-HgL}cJKbQZ3r#Ar]\%U(#6}'?<3s7%(%(gxJxxcR Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: ClamAV using ClamSMTP X-OriginalArrivalTime: 16 Jun 2009 14:54:22.0977 (UTC) FILETIME=[55DA3710:01C9EE92] Subject: Re: Problem with bash script X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: freebsd-questions@freebsd.org List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Jun 2009 14:54:24 -0000 On Tue, 16 Jun 2009 15:56:15 +0200 Bertram Scharpf wrote: > Hi, > > Am Dienstag, 16. Jun 2009, 09:09:09 -0400 schrieb Carmel NY: > > [...] It seems to work until I get to the copy part where it fails. > > > > My scripting skills are not that good. Perhaps someone could tell me > > what I am doing wrong. > > > > # copy the file to another directory using the base name > > cp $i /usr/home/tmp/$BN > > Please provide the error message next time. > > I guess the filenames contain spaces. Try > > cp "$i" "/usr/home/tmp/$BN" > > Bertram I am an idiot. The problem was that the directory did not exist. It was suppose to be "$HOME/tmp/$BN". However, I rarely use find and was not aware of the '-exec' function. I use that and it worked fine. Thanks to everyone for their assistance. -- Carmel