2021-12-26 16:21:50 -08:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# toggles whether a file or group of files is executable
|
|
|
|
|
2024-02-29 19:41:40 -08:00
|
|
|
for FILE; do
|
2024-05-31 01:04:22 -07:00
|
|
|
if [ -x "$FILE" ]; then
|
|
|
|
chmod -x "$FILE" &&
|
2021-12-26 16:21:50 -08:00
|
|
|
echo -e "$FILE: -x"
|
2024-05-31 01:04:22 -07:00
|
|
|
elif ! [ -x "$FILE" ]; then
|
|
|
|
chmod +x "$FILE" &&
|
2021-12-26 16:21:50 -08:00
|
|
|
echo -e "$FILE: +x"
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|