From owner-freebsd-questions Tue Dec 10 9: 8:55 2002 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 2F10637B401 for ; Tue, 10 Dec 2002 09:08:54 -0800 (PST) Received: from lusso.peritek.com (lusso.peritek.com [198.151.249.150]) by mx1.FreeBSD.org (Postfix) with ESMTP id CECB643EC2 for ; Tue, 10 Dec 2002 09:08:53 -0800 (PST) (envelope-from dan@peritek.com) Received: by lusso.peritek.com (Postfix, from userid 2050) id 9E8B321119; Tue, 10 Dec 2002 09:08:48 -0800 (PST) Received: from lotus.peritek.com (lotus.peritek.com [198.151.249.17]) by lusso.peritek.com (Postfix) with ESMTP id 70AD420F13 for ; Tue, 10 Dec 2002 09:08:47 -0800 (PST) Message-Id: <5.1.0.14.2.20021210084343.00aa3228@pop3.peritek.com> X-Sender: dan@pop3.peritek.com X-Mailer: QUALCOMM Windows Eudora Version 5.1 Date: Tue, 10 Dec 2002 09:08:47 -0800 To: questions@freebsd.org From: Dan Malaby Subject: OT: shell questions Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Spam-Status: No, hits=-0.1 required=5.0 tests=AWL version=2.41 X-Spam-Level: X-Scanned-By: Anomy Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I know this is off topic but this list does seem to have the most knowledgeable people for this kind of question. I have a 4.7 FBSD with samba running, so I get a lot of files with unkosher names ie. spaces in the name. So what I tried doing was to write a shell script using sh that located these files and changed the space to a underbar. I know that if I, from the keyboard, put quotes around the offending name, that I can mv the file to a new name. So I wrote a shell script using awk and sed to make a file with the offending names with quotes around them. Then I tried to feed this into another script that was going to do the actually mv. The problem was that the shell script that read the file still thought that the spaces in the file name were separators, eventho the names were quoted. So then I tried skipping making the extra file and just used the awk and sed to feed the for in statement. I know that the awk and sed were working properly because I can make a file with the file names quoted. That did did not work either, I still kept getting file not found because it still was seeing the space as a seperator. Any help or pointers would be appreciated. TIA To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message