From owner-freebsd-questions Thu Mar 2 21:48:19 2000 Delivered-To: freebsd-questions@freebsd.org Received: from uclink4.berkeley.edu (uclink4.Berkeley.EDU [128.32.25.39]) by hub.freebsd.org (Postfix) with ESMTP id 5EAE137B6D0 for ; Thu, 2 Mar 2000 21:48:17 -0800 (PST) (envelope-from joepark@uclink4.berkeley.edu) Received: from lisa (c833307-a.pinol1.sfba.home.com [24.11.139.49]) by uclink4.berkeley.edu (8.8.8/8.8.8) with ESMTP id VAA31104 for ; Thu, 2 Mar 2000 21:48:10 -0800 (PST) Message-Id: <4.2.0.58.20000302214315.00c0e100@uclink4.berkeley.edu> X-Sender: joepark@uclink4.berkeley.edu X-Mailer: QUALCOMM Windows Eudora Pro Version 4.2.0.58 Date: Thu, 02 Mar 2000 21:55:07 -0800 To: freebsd-questions@FreeBSD.ORG From: Joe Park Subject: very basic scripting questions Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hello, I'm a newbie and I would like to ask you guys about scripting. I need to write a script that does chmod functions on files/directories listed at separate file. (it doesn't have to be a argument. the script already knows the name of the file.) For example, let say there is a file list_files.txt list_files.txt : 750 /usr/src/tmp 750 /usr/src/lib How do I feed each line to chmod? (maybe with cat?) How about if I need to do some filtering, using regular expression? I'm sorry to bother you guys with such a simple question. Where can I find more books about unix scripting? I just bought "mastering regular expression" from O'Reilley. Is this a right choice? Thank you for your help. Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message