Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2002 04:43:15 +0200 (CEST)
From:      rootjrs <jrs@rootshell.be>
To:        freebsd-questions@FreeBSD.ORG
Subject:   perl / ksh help
Message-ID:  <Pine.LNX.4.44.0210250414470.537-100000@phenix.rootshell.be>

next in thread | raw e-mail | index | archive | help
hi,

I know some one has already done this and I need a little help.  I have 
two identical directories on two seperate machines.  The files were 
moved over fromm machine a to machine b.  Everything is working 
properly on machine b but all of the permissions were lost.

I've done the following:

(machine a)# find ./ -ls -print > perm.list

Gave me the file listing and permisions

(machine a)# cat perm.list | awk '{print $4," ",$11}' > newperm.list

This removed garbage like date owners etc that I didn't need.

Now I'm stuck with a file that looks like this:

-rw-r--r--   ./data/dir/data/getme.bin.old
-rw-rw-rw-   ./data/dir/data/stp.501
drwxrwxrwx   ./data/dir/data/realgoodgold
-rwsr-xr-x   ./data/dir/exe/help

At this point I'm thinking great, now all I need is to create a perl or 
shell script that converts the -rw-r--r--, etc into some sort of numerical value and then 
do soemthing like this

for
chmod $1 $2
done

.....using perl or ksh.  However I can't figure out how to do the 
conversion correctly.  Please will one of you perl / ksh experts please 
help me out.  

SEcondly I have a perl script that calls:

use GIFgraph::lines

The maker is now saying to call GD::Graph instead of
GIFgraph 
(http://www.cpan.org/modules/by-module/GIFgraph/GIFgraph-1.20.readme).  
I need to re-engineer the script is there a tutorial on GD:Graph some 
where?

Thanks



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?Pine.LNX.4.44.0210250414470.537-100000>