Bash Variable Scope with Pipes
Bash Variable Scope with Pipes: a task in Terminal-Lego-15k (Harbor dataset). In Bash, when you pipe data to a while loop, the loop runs in a subshell. Variables modified inside this subshell are not visible in the parent shell after the loop completes. Your task is to fix a Bash script that…
The task
In Bash, when you pipe data to a `while` loop, the loop runs in a subshell. Variables modified inside this subshell are not visible in the parent shell after the loop completes. Your task is to fix a Bash script that demonstrates this common scoping issue.
Part of PrimeIntellect/Terminal-Lego-15k.