[email protected],[email protected],[email protected]
I want to write loop in bash script to scroll through each of this host_list & try to grep a particular string '[email protected]'. if its present then return yes or no
[email protected],[email protected],[email protected]
I want to write loop in bash script to scroll through each of this host_list & try to grep a particular string '[email protected]'. if its present then return yes or no
host_list=( [email protected] [email protected] [email protected] )would be more sensible; then you can justfor host in "${host_list[@]}"; do ...array=( $string )is an antipattern -- while commonly used, it introduces bugs.