created shell dir

This commit is contained in:
2025-02-23 15:43:13 +00:00
parent b1f506bbd9
commit 4372a9042b
14 changed files with 0 additions and 0 deletions

17
shell/array.sh Normal file
View File

@@ -0,0 +1,17 @@
#!/bin/bash
ARRAY=($(ls *.txt))
COUNT=0
echo -e "FILE NAME \t WRITEABLE"
for FILE in "${ARRAY[@]}"
do
echo -n $FILE
echo -n "[${#ARRAY[$COUNT]}]"
if [ -w "$FILE" ]; then
echo -e "\t YES"
else
echo -e "\t NO"
fi
let COUNT++
done