[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Speeding up a find and subsequent grep
From: |
Greg Wooledge |
Subject: |
Re: Speeding up a find and subsequent grep |
Date: |
Mon, 21 Dec 2020 07:55:13 -0500 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Sat, Dec 19, 2020 at 01:56:22PM +0000, Chris Elvidge wrote:
> I don't know if it will help but: make a executable script like this
>
> #!/bin/bash
> ## ./auto_chmod
> ## 750 is same as u=rwx,g=rx,o=
> echo "$1"
> file -b "$1" | grep -E "^PHP|^Python" && chmod -v 750 "$1" || chmod -v 640
> "$1"
https://mywiki.wooledge.org/BashPitfalls#pf22