OFB Community Mailing Lists

The following archives are provided as a public service to the community. Opinions archived here do not necessarily represent the opinions of Open for Business or its contributors.

[CS-FSLUG] Script-error

Brian Derr bderr at myrealbox.com
Thu May 13 10:45:32 EDT 2004


On Wed, May 12, 2004 at 07:50:52PM +0300, Jukka Y wrote:
> Sorry to bother you with this again, but I (still) have some problem with the 
> script Jonathan sent to me few days ago... I removed "tildes" as David told 
> me to, but perl-interpreter keeps warning me that "Unrecognized character 
> \xA0 at convert line 10." There may be more coming later, but could somebody 
> perl-capable point me what the error is?

Quick hint, if you are asking for help on a certain line, number your
script (man nl).

> I named script to "convert" and it looks this now:
[...]

Here is my updated script, try this out...I don't have c44 on my system
so I couldn't fully test this.


     1	#!/usr/bin/perl
       
     2	use strict;
     3	use warnings;
     4	 
     5	my $filelist = `find`;
     6	my @files = split /\n/,$filelist;
     7	for my $file (@files) {
     8	   next unless ($file =~ m#\.jpg$#);
     9	   $file =~ s#\.[^/]*$##;
       
    10	   my @cmdlist = <<EOF;
    11	convert '$file.jpg' '$file.pnm'
    12	rm '$file.jpg'
    13	c44 '$file.pnm' '$file.djvu'
    14	rm '$file.pnm'
    15	EOF
       
    16	   system ( @cmdlist );
    17	}

Let me know if this works.  I think the problem is that you cannot give
multiple commands to system() the way you did.  I could easily be wrong
though.  :-D

Brian

-- 
The just man walketh in his integrity:
his children are blessed after him.  -- Proverbs 20:7
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://cedar.serverforest.com/pipermail/christiansource_ofb.biz/attachments/20040513/f2ca5af1/attachment.bin


More information about the Christiansource mailing list
Home About Connect: Twitter Facebook RSS
© 2001-2011 Universal Networks, All Rights Reserved. Some content rights may be held by Universal Networks' providers and used under license. Powered by ServerForest and SAFARI. Learn about our privacy policy here.