From owner-freebsd-questions Fri Mar 3 6: 1:58 2000 Delivered-To: freebsd-questions@freebsd.org Received: from matrix.buckhorn.net (matrix.buckhorn.net [208.129.165.68]) by hub.freebsd.org (Postfix) with ESMTP id 3014B37B579 for ; Fri, 3 Mar 2000 06:01:56 -0800 (PST) (envelope-from bob@buckhorn.net) Received: from buckhorn.net (nebula.buckhorn.net [208.129.165.66]) by matrix.buckhorn.net (8.9.3/8.9.3) with ESMTP id IAA12695; Fri, 3 Mar 2000 08:02:33 -0600 (CST) (envelope-from bob@buckhorn.net) Message-ID: <38BFC60B.6702B01E@buckhorn.net> Date: Fri, 03 Mar 2000 08:02:51 -0600 From: Bob Martin X-Mailer: Mozilla 4.72 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: Joe Park Cc: freebsd-questions@FreeBSD.ORG Subject: Re: very basic scripting questions References: <4.2.0.58.20000302214315.00c0e100@uclink4.berkeley.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Joe Park wrote: > > 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 Joe, Along with everything else you've heard so far, you may want to read the man page for your shell of preference. I would add that O'Reilley's also carries shell programming books. As you may have surmised, Unix has a rich environment for automating tasks. Dig in, and you will find the one that works the best for you. Bob To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message