Mailing-List: contact cygwin-developers-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-developers-owner AT cygwin DOT com Delivered-To: mailing list cygwin-developers AT cygwin DOT com X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs Date: Wed, 23 Oct 2002 00:10:01 -0400 (EDT) From: Igor Pechtchanski To: cygwin-developers AT cygwin DOT com Subject: Re: Shell scripts [was Re: Avoiding /etc/passwd and /etc/group scans] In-Reply-To: <20021023023710.GB25192@redhat.com> Message-ID: Importance: Normal MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-2022861571-1035346201=:8025" This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime AT docserver DOT cac DOT washington DOT edu for more info. ---559023410-2022861571-1035346201=:8025 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 22 Oct 2002, Christopher Faylor wrote: > On Tue, Oct 22, 2002 at 10:15:31PM -0400, Igor Pechtchanski wrote: > >On Tue, 22 Oct 2002, Pierre A. Humblet wrote: > >> I would also distribute a script or a program to chmod all scripts > >> in a tree. Under user control, not from setup. > > > >I have a reasonably customizable script that I use for exactly the > >opposite -- some files in my tree are created executable, and I use this > >script to chmod -x all those that aren't (using extensions OR magic). If > >people think it would be helpful, I could modify it to do what you wanted > >and send it to this list. > > I'd like to see what you have. Thanks for offering. > cgf Note that the attached script changes the mode of files to non-executable if they *don't* conform to a particular pattern, i.e., does the opposite of what's needed here. The "customization" can be performed by adding extensions to EXEEXT or patterns to EXEPAT. The patterns are separated by the ^A character (0x01). The script currently requires perl and awk (which can be replaced by perl). It's pretty raw, but I haven't had a reason to polish it. Igor -- http://cs.nyu.edu/~pechtcha/ |\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com |,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski '---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow! "Water molecules expand as they grow warmer" (C) Popular Science, Oct'02, p.51 ---559023410-2022861571-1035346201=:8025 Content-Type: TEXT/PLAIN; charset=US-ASCII; name=fixexec Content-Transfer-Encoding: BASE64 Content-ID: Content-Description: Content-Disposition: attachment; filename=fixexec IyEvYmluL3NoDQojDQojIEEgc2NyaXB0IHRvIGZpeCB1cCBleGVjdXRhYmxl IHBlcm1pc3Npb25zDQojIEF1dGhvcjogSWdvciBQZWNodGNoYW5za2kgPHBl Y2h0Y2hhQGNzLm55dS5lZHU+DQojDQoNClBST0dOQU1FPSJgYmFzZW5hbWUg IiQwImAiDQpVU0FHRT0iVXNhZ2U6ICRQUk9HTkFNRSBbLXZ8LS12ZXJib3Nl XSBbLW58LS1kcnktcnVuXSBbLWJ8LS1iYXRjaF0gW2RpcnNdIg0KREFTSF9Q UklOVD0NCkVDSE89DQpURUU9Y2F0DQpCQVRDSD0NCmR1cDIoKSB7DQojICB4 YXJncyAtMCAtbiAxIHBlcmwgLWUgJ2V4aXQgdW5sZXNzICgkYT1zaGlmdCk7 cHJpbnQgU1RERVJSICIkYVxuIjtwcmludCAiJGFcMCInDQojICB4YXJncyAt MCAtbiAxMDAgcGVybCAtZSAnZm9yZWFjaChAQVJHVil7cHJpbnQgU1RERVJS ICIkX1xuIjtwcmludCAiJF9cMCJ9Jw0KICBwZXJsIC1lICckLz0iXDAiO3do aWxlKDw+KXtjaG9tcCgpO3ByaW50IFNUREVSUiAiJF9cbiI7cHJpbnQgIiRf XDAifScNCn0NCndoaWxlIFsgLW4gIiQxIiBdOyBkbw0KICBjYXNlICIkMSIg aW4NCiAgICAtaHwtLWhlbHApIGVjaG8gIiRVU0FHRSIgPiYyIDsgZXhpdCAw IDs7DQogICAgLXZ8LS12ZXJib3NlKSBEQVNIX1BSSU5UPSItcHJpbnQiIDsg VEVFPWR1cDIgOzsNCiAgICAtbnwtLWRyeS1ydW4pIEVDSE89ImVjaG8iIDs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