Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There are better ways to split a string on spaces in Bash than calling external tools. For example, the following will split the line as intended, and put the results in variables:

    read name state roles ages version <<< "$result"


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: