Skip to content

Commit

Permalink
Reading array with mapfile
Browse files Browse the repository at this point in the history
  • Loading branch information
Dashboy1998 committed Feb 1, 2024
1 parent e7ad980 commit 4e7971e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ su steam -c ./start.sh &
killpid="$!"
wait $killpid

backup_pids=($(pgrep backup))
mapfile -t backup_pids < <(pgrep backup)
if [ "${#backup_pids[@]}" -ne 0 ]; then
echo "Waiting for backup to finish"
for pid in "${backup_pids[@]}"; do
Expand Down

0 comments on commit 4e7971e

Please sign in to comment.