INLINE
> -----Original Message-----
> From: Johnson, Shaunn [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, December 17, 2002 12:26 PM
> To: '[EMAIL PROTECTED]'
> Subject: names with spaces
>
>
> Howdy:
>
> I thought that this worked, but, I have a script where
> I try to get a list of file names that have spaces
> and do something with those files (in this example,
> I'm making ISO images out of them).
>
> The problem is, the first step is to create a sub-directory
> in a path that have spaces in the names.
>
> I thought I fixed it, but, it seems that the script
> fails one way or the other (building the sub-directory
> or the creation of the files).
>
> Can someone tell me why this is not working?
>
> [snip script]
>
> #!/usr/bin/perl -w
> #use strict;
> use diagnostics;
>
> # created on 10 Dec 02
>
> #==================================================================
> # makeiso
> # featuring options for viewing from MS Windows OS
> #==================================================================
>
>
> ** errors here? **
>
> # where should the ISO images go?
> my $dest='/i/"Depression Management"/Mailing/test_dir';
$dest=~s/ /\\ /g;
#search replace global. If space replace with "\<sp>"
>
> ** errors here, too? **
>
> # Where is data coming from?
> my $source='/i/"Depression Management"/Mailing/Dec2002';
>
>
> #------CREATE DIRECTORIES FOR EACH REGION OFR ISO
> IMAGES------------- mkdir "$dest", 0777 unless -d "$dest";
> #create the /i/Depression Management/Mailing/
> #dec2002_iso_images
> directory
>
> foreach my $region qw(03 04 05 06) #qw=quote word equivalent to
> splitting
> # a single quoted
> string on white
> space
> {
> mkdir "$dest/$region",0777 unless -d "$dest/$region";
> #create the /i/Depression Management/
>
> #Mailing/dec2002_iso_images\03...04...05...06 $directories
> print "$dest/$region \n";
> }
>
> #-------------------- BUILD ISO IMAGES --------------------
> # finally works ... test only one BU ...
> foreach my $group ( `ls -d1 $source/0*/*`) {
> ($bu, $pcgname)=($group =~ m/\/(0\d)\/(.*)/i);
> #`/usr/bin/mkisofs -o $dest/$bu/"$pcgname".iso -r
> $source/$bu/"$pcgname" `;
> ** i have to change the above again because "$<var_name>" no
> longer works **
> `/usr/bin/mkisofs -graft-points -f -J -r -V
> 'Depression' -v -o $dest/$bu/"$pcgname.iso"
> $source/$bu/"$pcgname" `; }
>
> [/snip script]
>
> Is there an alternative to this? Like devise a BASE path and
> just mess with the images ...?
>
> Thanks!
>
> -X
>
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]