Date: Tue, 10 Dec 2002 09:08:47 -0800 From: Dan Malaby <dan@peritek.com> To: questions@freebsd.org Subject: OT: shell questions Message-ID: <5.1.0.14.2.20021210084343.00aa3228@pop3.peritek.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?5.1.0.14.2.20021210084343.00aa3228>