From owner-freebsd-questions@FreeBSD.ORG Sun Jan 15 07:36:07 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 A905C16A41F for ; Sun, 15 Jan 2006 07:36:07 +0000 (GMT) (envelope-from r11roadster@yahoo.com) Received: from mxsf11.cluster1.charter.net (mxsf11.cluster1.charter.net [209.225.28.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 025EC43D48 for ; Sun, 15 Jan 2006 07:36:06 +0000 (GMT) (envelope-from r11roadster@yahoo.com) Received: from mxip01a.cluster1.charter.net (mxip01a.cluster1.charter.net [209.225.28.131]) by mxsf11.cluster1.charter.net (8.12.11/8.12.11) with ESMTP id k0F7a6DW029915 for ; Sun, 15 Jan 2006 02:36:06 -0500 Received: from 68-119-38-069.dhcp.spbg.sc.charter.com (HELO [192.168.1.67]) ([68.119.38.69]) by mxip01a.cluster1.charter.net with ESMTP; 15 Jan 2006 02:36:06 -0500 X-IronPort-AV: i="3.99,368,1131339600"; d="scan'208"; a="1721466458:sNHT32465610" Received: from 127.0.0.1 (AVG SMTP 7.1.371 [267.14.17/229]); Sun, 15 Jan 2006 02:35:54 -0500 Message-ID: <43C9FB5A.2050506@yahoo.com> Date: Sun, 15 Jan 2006 02:35:54 -0500 From: Ronny Hippler User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: freebsd questions X-Enigmail-Version: 0.93.2.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: shell scripts and escaped charecters in file names 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, 15 Jan 2006 07:36:07 -0000 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hello, I am trying to get the following script to run with no success. - ------------------------------------ #!/bin/csh foreach file (\*vol\*) mv $file `basename $file .par2`.PAR2 echo $file end - ------------------------------------ and get the following error: usage: mv [-f | -i | -n] [-v] source target ~ mv [-f | -i | -n] [-v] source ... directory I know it is because of the spaces and such in the file names. I have tried quoting single double and also escaping them but all fails. what is the magic? Please cc me off list. thanks! - -- Backup not found: (A)bort (R)etry (P)anic Ronny Hippler || Spartanburg SC http://www.ronnyhippler.com/ || ftp://ftp.vr5.dyndns.org:2112/ PGP key: http://www.ronnyhippler.com/Ronny_Hippler_PGP.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFDyftaN6qJSxoonroRAo/bAJ4hLG6hKvol/bnKFcfPL8cwES6c7wCbBC2s U1nF938YAhkfCeYasCA/Gtk= =uU/t -----END PGP SIGNATURE-----