From owner-freebsd-questions Fri Oct 25 5: 6:40 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15EAB37B401 for ; Fri, 25 Oct 2002 05:06:39 -0700 (PDT) Received: from rootshell.be (phenix.rootshell.be [195.74.192.154]) by mx1.FreeBSD.org (Postfix) with ESMTP id F315643E4A for ; Fri, 25 Oct 2002 05:06:37 -0700 (PDT) (envelope-from jrs@phenix.rootshell.be) Received: from localhost (jrs@localhost) by rootshell.be (8.11.5/8.11.5) with ESMTP id g9PC6X210364 for ; Fri, 25 Oct 2002 14:06:34 +0200 Date: Fri, 25 Oct 2002 14:06:33 +0200 (CEST) From: rootjrs To: freebsd-questions@FreeBSD.ORG Subject: perl / ksh help In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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