[K12OSN] Script Error with file names that have spaces
Dennis Daniels
ddaniels at magic.fr
Wed Sep 1 23:56:56 UTC 2004
Jim,
I'd like to post this script to a couple of wikis,
http://wiki.linuxquestions.org/wiki/Shell_scripts
and to my own... I'm trying to flesh out scripts for teacher/sys-admins
http://dennisgdaniels.com/tiki-index.php?page=Teacher+Sys+Admin
and here:
http://www.k12ltsp.org/phpwiki/index.php/HomePage
I checked for a ltsp wiki and found this one:
http://www.openbrick.org/wiki/ltsp/FrontPage
but no wiki for ltsp.
What do you think, is it okay by you?
Dennis
Jim Kronebusch wrote:
>>Put the $file in side double quotes For example:
>>
>> chown -R $owner "$file"
>
>
> Thanks Jeff and Dave. Between both of your suggestions I now have
> things working again with the following:
>
> #!/bin/bash
> for file in /home/Drop/*
> do owner=$(ls -ld \
> "$file"\
> |awk '{print $3}')
> chown -R $owner \
> "$file"
> Done
>
>
> This is what makes this list awesome.
>
> Thanks again.
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.744 / Virus Database: 496 - Release Date: 8/24/2004
>
>
>
More information about the K12OSN
mailing list