# The Shell You Know vs The Shell You Deserve

> Source: <https://dev.to/lovestaco/the-shell-you-know-vs-the-shell-you-deserve-38pf>
> Published: 2026-07-10 18:23:37+00:00

*Hello, I'm Maneshwar. I'm building git-lrc, a Micro AI code reviewer that runs on every commit. It is free and source-available on Github. Star git-lrc to help devs discover the project. Do give it a try and share your feedback.*

You've been using the terminal for months/ years.

Maybe you `cd`

into a folder, `ls`

around, run your script, and call it a day. That's fine.

That's like knowing how to boil water and calling yourself a chef.

But the terminal has *layers*.

It's basically an onion that occasionally makes you cry, usually around 12 AM when a script fails silently and you have no idea why.

So grab your coffee and let's talk about the command line tricks that actually make your life better.

Not the "did you know `ls -la`

shows hidden files" tier tips.

Most devs mash the up arrow like it's 2007 and they're trying to beat a Flash game. Stop that. Press `ctrl-r`

instead.

It searches your command history live. Type a few letters, it finds the last matching command. Press `ctrl-r`

again to cycle back further. Found it? Hit Enter to run it, or the right arrow to drop it into your prompt so you can edit it first.

```
ctrl-r
(reverse-i-search)`docker run`: docker run -it --rm -v $(pwd):/app node:20 bash
```

Pair this with `ctrl-w`

(delete last word) and `ctrl-u`

(nuke the line back to the cursor) and you'll start editing commands like you're speedrunning a text adventure.

And if you're the type who types a whole essay of a command and then realizes you forgot something at the start, `ctrl-a`

jumps to the beginning of the line and `ctrl-e`

jumps to the end. No more holding the left arrow key like it owes you money.

Pro tip: if you're a TUI fan and ctrl-r's default search feels a bit flat, check out [McFly](https://github.com/cantino/mcfly)

`xargs`

Is The Friend Who Actually Shows Up
Pipes (`|`

) are great. They pass output from one command into another.

But sometimes you don't want to pass output as *input*, you want to pass it as *arguments*.

That's where `xargs`

comes in, and once you get it, you will not shut up about it to your coworkers.

```
find . -name '*.py' | xargs grep some_function
```

This finds every Python file and then greps inside each one for `some_function`

.

Without `xargs`

, `grep`

would just sit there waiting for the file list to be typed into stdin like it's a hostage negotiation.

Want to run something on a bunch of remote servers?

```
cat hosts | xargs -I{} ssh root@{} master
```

The `-I{}`

bit lets you place each item wherever you want in the command, not just at the end.

It's the difference between a command that follows orders and a command that actually understands the assignment.

If you're not 100% sure `xargs`

is going to do what you think, run it through `echo`

first as a dry run:

```
find . -name '*.log' | xargs echo rm
```

Look before you leap. Or in this case, look before you `rm`

.

Remember Venn diagrams from school? Turns out `sort`

and `uniq`

can do union, intersection, and difference on text files, and it scales to files way bigger than your RAM because `sort`

doesn't need to hold everything in memory at once.

```
sort a b | uniq > c        # union: everything in a or b
sort a b | uniq -d > c     # intersection: only in both
sort a b b | uniq -u > c   # difference: only in a, not b
```

That last one is sneaky clever.

Listing `b`

twice means anything from `b`

shows up at least twice, so `uniq -u`

(which only prints lines that appear exactly once) filters it right out, leaving only stuff unique to `a`

.

This is genuinely useful for things like comparing two lists of usernames, config keys, or "which servers are in prod but not in staging."

No Python script needed.

Just good old fashioned sorting.

Here's a thing that will save you actual hours of debugging: start your Bash scripts with this.

```
set -euo pipefail
trap "echo 'error: Script failed: see failed command above'" ERR
```

Breaking it down:

`-e`

exits immediately if any command fails`-u`

errors out if you reference an unset variable, instead of silently treating it as empty`-o pipefail`

makes a pipeline fail if `trap`

prints a clear message when something goes wrong, so you're not left squinting at the last visible line of output wondering what happened three commands agoWithout this, a script can quietly march past a failed step like nothing happened, and you won't find out until three steps later when everything is on fire.

With it, the script stops and yells at you immediately, which honestly is the kind of tough love we all need sometimes.

If you just want a quick reminder of how to use a command without opening a novel-length man page, try this:

```
curl cheat.sh/tar
```

Swap `tar`

for basically any command and you'll get a short, practical cheat sheet with real examples.

It's like having a senior dev who answers instantly and never gets annoyed at you for asking the same question twice.

None of this is magic. It's mostly just muscle memory and knowing your tools have more depth than the five commands you learned in your first week of using Linux.

The terminal isn't scary, it's just underexplored, kind of like the settings menu on your TV.

If you want the extended version of basically everything above and then some, [The Art of Command Line](https://github.com/jlevy/the-art-of-command-line) on GitHub is the OG I'm riffing on.

Bookmark it, actually read it once, and you'll be dangerously productive.

Now go forth and pipe responsibly xD

Disclaimer: This article was written by me; AI was used to fix grammar and improve readability.

AI agents write code fast. They also silently remove logic, change behavior, and introduce bugs — without telling you. You often find out in production.

git-lrc fixes this. It hooks into git commit and reviews every diff before it lands. 60-second setup. Completely free.

Any feedback or contributors are welcome! It's online, source-available, and ready for anyone to use.

⭐ Star it on GitHub:

| [🇩🇰 Dansk](https://github.com/HexmosTech/git-lrc/readme/README.da.md) | [🇪🇸 Español](https://github.com/HexmosTech/git-lrc/readme/README.es.md) | [🇮🇷 Farsi](https://github.com/HexmosTech/git-lrc/readme/README.fa.md) | [🇫🇮 Suomi](https://github.com/HexmosTech/git-lrc/readme/README.fi.md) | [🇯🇵 日本語](https://github.com/HexmosTech/git-lrc/readme/README.ja.md) | [🇳🇴 Norsk](https://github.com/HexmosTech/git-lrc/readme/README.nn.md) | [🇵🇹 Português](https://github.com/HexmosTech/git-lrc/readme/README.pt.md) | [🇷🇺 Русский](https://github.com/HexmosTech/git-lrc/readme/README.ru.md) | [🇦🇱 Shqip](https://github.com/HexmosTech/git-lrc/readme/README.sq.md) | [🇨🇳 中文](https://github.com/HexmosTech/git-lrc/readme/README.zh.md) | [🇮🇳 हिन्दी](https://github.com/HexmosTech/git-lrc/readme/README.hi.md) |

GenAI today is a **race car without brakes**. It accelerates fast -- you describe something, and large blocks of code appear instantly. But AI agents *silently break things*: they remove logic, relax constraints, introduce expensive cloud calls, leak credentials, and change behavior -- without telling you. You often find out in production.

** git-lrc is your braking system.** It hooks into

`git commit`

and runs an AI review on every diff In short, git-lrc helps **Prevent Outages, Breaches, and Technical Debt Before They Happen**

**At a glance:** [10 risk categories](https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for) · [100+ failure patterns tracked](https://github.com/HexmosTech/git-lrc#what-git-lrc-checks-for) · every commit…
