tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: service(8): post commit feedback solicited



On 26/03/2015 08:43, Roy Marples wrote:
> On 25/03/2015 22:04, Adrian Steinmann wrote:
>> +    for d in ${rc_directories}; do
>> +        if [ -d $d ]; then
>> +            (cd $d && ls | while read f; do echo "$d/$f"; done) 2>/dev/null
>> +        fi
>>      done | xargs rcorder -s nostart ${rc_rcorder_flags} 2>/dev/null
> 
> 
> You don't even need ls or a subshell
> 
> +    for d in ${rc_directories}; do
> +        if [ -d "$d" ]; then
> +             for f "$d"/*; do
> +                   [ -f "$f" -a -x "$f" ] && echo "$f"
> +             done
> +        fi
>      done | xargs rcorder -s nostart ${rc_rcorder_flags} 2>/dev/null

+             for f in "$d"/*; do

As pointed out by Masao Uebayashi.


Home | Main Index | Thread Index | Old Index