Answers for "How do I convert the a table of data into list entires Ask Question"

0

How do I convert the a table of data into list entires Ask Question

# This below line help
# IFS=$'\r\n' GLOBIGNORE='*'

data="1 apple 50 Mary
2 banana 40 Lily
3 orange 34 Jack"

IFS=$'\r\n' GLOBIGNORE='*'
for i in ${data}
do
  echo $i
  echo "test" 
done

# Resulted Output
1 apple 50 Mary
test
2 banana 40 Lily
test
3 orange 34 Jack
test
Posted by: Guest on February-02-2021

Code answers related to "How do I convert the a table of data into list entires Ask Question"

Browse Popular Code Answers by Language