Basic scripting is done

This commit is contained in:
Hizenberg469
2024-11-30 11:20:46 +05:30
parent 1ede16f3c4
commit 04859194ac
8 changed files with 369 additions and 1 deletions

17
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