Looping through the output of a command field by field

suggest change

Let’s assume that the field separator is :

while IFS= read -d : -r field || [ -n "$field" ];do
    echo "**$field**"
done < <(ping google.com)

Or with a pipe:

ping google.com | while IFS= read -d : -r field || [ -n "$field" ];do
    echo "**$field**"
done

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents