Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 02 Mar 2000 21:55:07 -0800
From:      Joe Park <joepark@uclink4.berkeley.edu>
To:        freebsd-questions@FreeBSD.ORG
Subject:   very basic scripting questions
Message-ID:  <4.2.0.58.20000302214315.00c0e100@uclink4.berkeley.edu>

next in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4.2.0.58.20000302214315.00c0e100>