I want to create a script that deletes the Nth word from the standard input, for a given N. For example, for this input:
One two three four, five
six seven eight, nine
If we ask to delete the 8th word, it should delete the eight,
. For my purposes, a word is any sequence of non-space characters.
One two three four, five
six seven nine
Is there some clever one-liner that can accomplish this using standard command line utilities? Currently I have a fairly long script to do this, but it feels like overkill.