Rewrite get_htaccess with xargs
This commit is contained in:
parent
d4462bbdee
commit
6f1ed9c6be
10
inventory.sh
10
inventory.sh
|
@ -44,11 +44,11 @@ get_confs() {
|
|||
}
|
||||
|
||||
get_htaccess() {
|
||||
mv -b "$confs_htaccess" "$confs_htaccess".bak || true
|
||||
|
||||
for file in $(cat "$confs"); do
|
||||
awk 'sub("^[[:space:]]*DocumentRoot[[:space:]]*", "") {print $0}' "$file" >> "$confs_htaccess"
|
||||
done
|
||||
xargs -P 0 \
|
||||
awk 'sub("^[[:space:]]*DocumentRoot[[:space:]]*", "")' \
|
||||
< "$confs" \
|
||||
| sort -u \
|
||||
| xargs -P 0 -I _ find _ -name .htaccess > "$confs_htaccess"
|
||||
}
|
||||
|
||||
count_directives() {
|
||||
|
|
Loading…
Reference in a new issue