#!/bin/sh
scripts_path="/home/anatoliy/scripts/test/"
scripts_names=( $(ls -a $scripts_path | egrep '\.sh$') )
for i in "${scripts_names[@]}"; do
echo "=== Start script $i ==="
sh $scripts_path$i
echo "=== End script $i"
done
test.sh: 4: test.sh: Syntax error: "(" unexpected
#!/bin/sh
scripts_path="/home/anatoliy/scripts/test/"
for i in $(ls -a $scripts_path | egrep '\.sh$'); do
echo "=== Start script $i ==="
sh $scripts_path$i
echo "=== End script $i"
done