Hacker News new | past | comments | ask | show | jobs | submit login

I wish awk had support for addressing a range of fields, like from $1 to $7. `cut` supports it, FWIW.



You can always loop through the fields, but it’s a little messy, especially for one-liners


Yes, that's an option. The range lookup is an ergonomic feature. Imagne what it would have been like, if we couldn't do foo[-3:] in Python.




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

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

Search: