So I\'m trying to do something, not sure if it\'s possible. I have the following code:
for i in {0..5}; do
if [[ -f ./user$i ]]; then
group$i=$(g
Try to use the export or declare function like this
for i in {0..5}; do
if [[ -f ./user$i ]]; then
export group$i=$(grep -w "group" ......
with declare
for i in {0..5}; do
if [[ -f ./user$i ]]; then
declare group$i=$(grep -w "group" ......
where export
makes the value available to sub-processes, and declare
just available within the same script.