Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

2
  • It makes the concept clear. Thanks for it. One followup question: for anime in $(eval echo \${$VALID_CATAGORY_ANIMAL[@]}); do here what is the purpose ofecho ? I understand, eval takes a command as arg. but echo is not really printing anything though. Commented Sep 7, 2020 at 5:18
  • @Aftab_Rai, eval returns a string as command and its arguments for execution in the shell. If there is no command then we get the following: eval hi >bash hi: command not found... Commented Sep 7, 2020 at 6:53