I always find exotic command-line tools cool but they never stick because Im constantly sshing/using/targeting a variety of systems I don't own that don't have them readily istalled
A bit tedious, but you would still get to use your favourite tools.
51–60 of 108 posts
I always find exotic command-line tools cool but they never stick because Im constantly sshing/using/targeting a variety of systems I don't own that don't have them readily istalled
A bit tedious, but you would still get to use your favourite tools.
As much as I do use a number of these tools, there's something to be said for being able to use any box you ssh or log into that has the default tools available on any *nix system. ls, cat, find, etc. I'm hypocritical a bit in that I do use rg, and fd, but I just can't bring myself to deviate too far from the 'default'.
Still though, these alternatives seem great for productivity locally, even if they’re not usable in a script.
I’m gonna sound like an old person here. As much as these tools are gorgeous and ergonomic, remember that the others are standard, which means they’re available (almost) everywhere. Still though, these alternatives seem great for productivity locally, even if they’re not usable in a script.
fd .log$ -x mv {} {.}.bak
(Rename *.log to *.bak)
Can I do that with xargs, awk, and find? Yes, but every time I have to look up the man page to at least one of them and it’s enough friction that I might just open it in finder if it’s a handful of files.Having some of these utilities around is a crutch that let me leverage the entire ecosystem much more when I don’t have it. And when I do log into a shared enviroment and don’t have my crutch, then it’s easy to fill in the missing puzzle piece because it’s one part that’s missing and I’ve got the rest of the environment down.
Of course if all you do is shared environments I wouldn’t suggest these, but I would encourage people to use these to get more familiar with the CLI ecosystem.
I always find exotic command-line tools cool but they never stick because Im constantly sshing/using/targeting a variety of systems I don't own that don't have them readily istalled
If you have access to the build tools, you can compile and install stuff in your home directory. A bit tedious, but you would still get to use your favourite tools.
in order to avoid having to unlearn commands like cat and ls, I use aliases to invoke bat and exa. Here's a screenshot of my fish config: https://twitter.com/mxschumacher/status/1168993005744918528
alias ls "exa"
alias ll "exa -ll"
That way you get the nice shorter output which comes in handy for piping ls things like: ls -d | xargs ls
Lists the files in subdirectories.Earlier quoted context omitted.
Catting a file will your terminal make interpret escape codes in the file. For instance: $ echo -e "\033]0;${USER} is an unfriendly person\007" > test-file.txt Then, many days later: $ cat test-file.txt will change your terminal title. With less, you _can_ interpret escape codes, but usually you don't, and I consider this the correct default.
Tried it -- didn't work. Single-quoting didn't work either. Terminal is urxvt. What is clear is that $ cat test-file.txt does not print the initially-echoed text, but it is escaped and up to nefarious tasks.
Earlier quoted context omitted.
Catting a file will your terminal make interpret escape codes in the file. For instance: $ echo -e "\033]0;${USER} is an unfriendly person\007" > test-file.txt Then, many days later: $ cat test-file.txt will change your terminal title. With less, you _can_ interpret escape codes, but usually you don't, and I consider this the correct default.
in your example it is not cat who "interprets" the escapes, but echo
I’m gonna sound like an old person here. As much as these tools are gorgeous and ergonomic, remember that the others are standard, which means they’re available (almost) everywhere. Still though, these alternatives seem great for productivity locally, even if they’re not usable in a script.
I’ve actually found myself using these to get me much more proficient in the Shell overall. fd in particular is so much easier to use I find myself doing things like: fd .log$ -x mv {} {.}.bak (Rename *.log to *.bak) Can I do that with xargs, awk, and find? Yes, but every time I have to look up the man page to at least one of them and it’s enough friction that I might just open it in finder if it’s a handful of files…
a bit more generic, `for` loops and parameter expansion are good to know for proficiency, and also I dislike typing curly braces.
Earlier quoted context omitted.
I’ve actually found myself using these to get me much more proficient in the Shell overall. fd in particular is so much easier to use I find myself doing things like: fd .log$ -x mv {} {.}.bak (Rename *.log to *.bak) Can I do that with xargs, awk, and find? Yes, but every time I have to look up the man page to at least one of them and it’s enough friction that I might just open it in finder if it’s a handful of files…
bash/zsh: for f in *.log; do mv "$f" "${f/%log/bak}"; done a bit more generic, `for` loops and parameter expansion are good to know for proficiency, and also I dislike typing curly braces.
No need for xargs, awk or find