mirror of
https://github.com/Hizenberg469/Makefile-tutorial.git
synced 2026-04-19 22:02:24 +03:00
created shell dir
This commit is contained in:
17
shell/array.sh
Normal file
17
shell/array.sh
Normal 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
|
||||
Reference in New Issue
Block a user