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

I don't know what that is intended with that, but for simple line splits I'd use awk, which is typically everywhere, and its parameter -F (F there stands for field separator) that is, given the file L with the lines

   hello,world,one
   maybe,baby,you
awk -F, '{ print $2 }' L

should give

   world
   baby
(tested on https://busybox.net/live_bbox/live_bbox.html )


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

Search: