79831777

Date: 2025-11-27 14:18:21
Score: 4
Natty:
Report link

@Diego I had checked some possibilities by piping various subcommands of xsv, xan, csvkit etc. Then got a long awk snippet which was technically one line and it did work. However it took more 10-15 seconds on a large dataset.

On oneliner need, this is not for a one time use or a script. I want to set an alias to the solution and want to use it like less -S or cat or so on many files on a daily basis. Also I wanted to really reach a more efficient solution.

Many thanks to @Barmar, @Shawn, @jhnc and @dawg for the suggested solutions.

The perl based solution from @jhnc do meet the requirements I wanted help with. It is way quicker than the awk snippet I had (and shorter also).

@RARE, I can agree that the in/out example do look like a homework. Getting it done without getting into a R/python/shell script was the difficult part.

Reasons:
  • Blacklisted phrase (0.5): thanks
  • RegEx Blacklisted phrase (1): I want
  • Long answer (-0.5):
  • No code block (0.5):
  • User mentioned (1): @Diego
  • User mentioned (0): @Barmar
  • User mentioned (0): @Shawn
  • User mentioned (0): @jhnc
  • User mentioned (0): @dawg
  • User mentioned (0): @jhnc
  • User mentioned (0): @RARE
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Jeffin Rockey