Sundeep Agarwal

Results 15 comments of Sundeep Agarwal

Yeah, I think I need to rewrite that sentence. Without applying `tac`, the task is about matching the last occurrence. After applying `tac`, the task changes to matching the first...

Thanks for letting me know, I'll fix them in the next version. I think I have many more such comma spliced run-on sentences.

I'm surprised by this: ```bash $ echo 'αλεπού' | awk '{print match($0, /$/)}' 13 $ echo 'αλεπού' | awk '{print match($0, /λ/)}' 2 $ echo 'αλεπού' | awk '{print match($0,...

Thanks, I'll mention it in the next update. I do mention this SO thread (https://stackoverflow.com/questions/45420535/whats-the-most-robust-way-to-efficiently-parse-csv-using-awk) as well as an alternate option, but yours is aimed to work with other tools...

I don't understand what you mean by `GNU sed` treats blank lines differently. By default, `sed` works only line by line. So, you cannot match across multiple lines unless you...

Your command is equivalent to `sed '/kill/d'` since `\n` gets stripped from each input line (gets added back when you use `N`, while printing, etc). Based on [this unix.stackexchange thread](https://unix.stackexchange.com/questions/228699/sed-print-lines-matched-by-a-pattern-range-if-one-line-matches-a-condition):...

```bash # empty replacement string, since sed adds back the newline while printing $ sed '/^$/{:a;N;/\n$/!ba; s/.*kill.*//}' ip.txt This is a sample text demonstration. ```

oops, clicked "close" issue by mistake.

```bash $ echo foo | sd '\w+' '$$a' $a ``` * You need to use `\w+` to match one or more word characters. `w+` will match one or more `w`...

Just checked the help page and seems it isn't documented. I knew about `$$` from using `ripgrep`. Perhaps you could submit the PR.