> Miller is a command-line tool for querying, shaping, and reformatting data files in various formats including CSV, TSV, JSON, and JSON Lines.
New(ish) command line tools
91–100 of 252 posts
Re: New(ish) command line tools
#92A simple trick I only figured recently is following logs with fuzzy search: tail -f /var/log/foo.log | fzf +s Or something similar for output from a dev server: make serve | fzf --ansi +s
Could you (or anyone who understands) explain what these do?
Edit: Ah, I see. According to another comment you see the output of the file as it changes.
Re: New(ish) command line tools
#93Earlier quoted context omitted.
Just posting this without trying it out...grep -nH gives you line numbers and full filepath context, and as another commenter said, -ve allows you to string multiple excludes, so grep -inH -ve not_this -ve nor_this -ve nor_that.
You don’t have to stack -v like that: -v inverts all the -e expressions, so this should be equivalent: grep -inHv -e foo -e bar -e baz
ps axjw | awk '(/zsh/ || /login/) && !(/awk/ || /direnv/)'
And you can easily add features like "print the first line unconditionally: ps axjw | awk 'NR == 1 {print} (/zsh/ || /login/) && !(/awk/ || /direnv/)'
IMO, awk is in a pretty uniquely sweet spot between grep and perl/ruby/python.Re: New(ish) command line tools
#94Earlier quoted context omitted.
Could you (or anyone who understands) explain what these do?
It just takes the last ten lines of a log file, then passes that input to a program that basically lets you search each line. I don't really see the usefulness. Edit: Ah, I see. According to another comment you see the output of the file as it changes.
Re: New(ish) command line tools
#95Re: New(ish) command line tools
#96Couple ones there that I’m keen to try out. bat in particular seems like such an easy win
I would love a meta tool that, every time I use one of the old tools, it automatically gives me a notice to use the new one instead, so I can learn. Then again I guess I could alias the old ones to point to the one one.
Re: New(ish) command line tools
#97A simple trick I only figured recently is following logs with fuzzy search: tail -f /var/log/foo.log | fzf +s Or something similar for output from a dev server: make serve | fzf --ansi +s
less +F -p pattern /path/to/log
(Ctrl-C to break out of tail mode. /pattern to interactively set search pattern.)Re: New(ish) command line tools
#98As a maintainer, I hoped to see Hurl [1], a tool for testing HTTP with plain text and curl, but alas it isn’t here! [1] https://hurl.dev
Re: New(ish) command line tools
#99 # search by content:
$ mdfind some_string
# search by name:
$ mdfind -name my_file.txt
Both commands return a list of files matching the query.Re: New(ish) command line tools
#100direnv is such a godsend that I shill for it on every team and in every company now, it's such a great tool.