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

> Use for to iterate over simple lists

I definitely use this all the time. Also, generating the list of things over which to iterate using the output of a command:

    for thing in $(cat file_with_one_thing_per_line) ; do ...


Why not?

    xargs -n1 command < file_with_one_thing_per_line


that's like bash 101, not sure why it's in there




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

Search: