Daily tasks are simpler when your partner is POSIX

Daily tasks are simpler when your partner is POSIX

A very short piece of code for people who want to quickly build something simple in Shell using simple streaming tools. There are no grams of dependencies, ready - made libraries, colors or unnecessary mechanisms. The biggest advantage is portability by the interpreter (sh - mksh) and resistance to updates, which can break something. Of course, the code is simple to modify and ready for change.

A great thing for beginners and those who value minimalism. Best regards

u/Pegasusw404 — 7 days ago
▲ 159 r/unix+1 crossposts

POSIX everywhere

What a typical old guy who doesn't play with colors, rice, shadows and dependencies on Python, Node.js, Rust, Go and so on and go on, I use every device with MirBSD, but I probably wanted to be the only one to show you a piece of code on the attached image of my portable UNIX terminal.

For many it will definitely be a cognitive dissonance, because there are no fountains here. Nor wasted time on an idiotic compilation. For those who know how a shell works without plugins, helpers and a lot of gadgets, this is an example of a tool to check the disk on the device.

Unfortunately, there is no neofetch to show what a hacker I am (joke)... Indeed, this script written on your knee in 2 minutes will work everywhere, on any system, on any distribution, on the washing machine, on the refrigerator even on the toaster if it has a processor :)

I invite you to the discussion, I will be happy to read about those pythons, rust or other toys that die every quarter.

Greetings

u/Pegasusw404 — 7 days ago

My Keitai Sharp

I’m very surprised, that so many people left a many upvotes and joined to discussion. Thanks for your time ! I just want to share, what exactly I have in this phone, only essential apps for daily work nothing special, but the best thing is: You can customise everything in this phone , highly recommend any Japanese Keitai if you really want something simple but capable.

u/Pegasusw404 — 10 days ago

I was sceptical about Japanese software

My Sharp Aquos Keitai 3 from SoftBank , I will never comeback to smartphones again, this phone have everything what I need.

u/Pegasusw404 — 10 days ago
▲ 8 r/CLI

From full Debian to MirBSD

For the curious, I wanted to share a story, this time using my own example. I have always been a proponent of simplicity and minimalism, but the benefits Debian gave me were generous: an applet manager, a complete environment, and a multitude of tools I could use in various projects. Unfortunately, after a while, I grew tired of it all. Debian was like a store where you could buy everything ready-made, connect it all, and call yourself an engineer.

Convenience has, over time, turned into a lack of motivation to act, to create something from scratch, in some sense of the word, a lack of architecture. Today, everything works the same way: smartphones are clogged with telemetry facades, unasked-for services, and heavy applications. It is the same with PC systems: dependencies follow dependencies, and so on, where we do not see simple things at first glance, only to later discover that a simple tool has a whole host of features without which it supposedly will not work.

When I desperately began searching for a replacement, I had to understand what I needed: a hammer and screwdriver, or perhaps an entire shopping mall where everything hangs on the wall, but it is heavy, unwieldy, and takes up too much space. I chose MirBSD (mksh) - why? Because I fell in love with this shell from the first time I launched it. After moments of excitement, I was greeted by emptiness, a sign of encouragement (prompt) waiting for my move. There is no store, no tips, no harsh shortcuts. It is you and what you want to do, and the machine does it for you.

Then I realized what I needed (and it is not that I am condemning other systems or preaching some doctrine and everyone needs to change their work environment). The point is that each of us today should ask ourselves this question: What do I really want from my Shell, from my system? Do I really have what I wanted? Or maybe it is time to change something, despite what others or marketing might tell us.

Thanks for your time and willingness to read this to the end.

reddit.com
u/Pegasusw404 — 13 days ago
▲ 17 r/CLI

The Editor War: The Trinity of Conflict

Vim_Chad: (Posts a screenshot showing 4 panels, 30 open buffers, and a list of 120 active plugins).

"Just finished optimizing my Vim config. Startup time: 0.8 seconds. Anyone else here running a setup this efficient?"

Neo_Noob**:** (Replies with a screenshot looking like a mission control center: animated rain, transparency, and Nerd Font icons in every corner).

"Weak, Chad. My Neovim has 200+ ricing points, an auto-launching dashboard tracking my last 100 commits, and a Neon-Void theme. Your windows look like they belong in a museum."

Ed_Geezer: (Silence for 30 seconds, then a single line appears). ⁠?⁠

Vim_Chad: "Oh, the veteran. We’ve been waiting for your take, Geezer. What do you think of our setups?"

Ed_Geezer**:** "I think you both need therapy. Chad is building a house of cards out of plugins that will break on the next update, and Noob is building a Christmas tree that uses more RAM than the entire OS I’m running."

Neo_Noob: "But it looks aesthetic!"

Ed_Geezer**:** "It looks like a rendering error. I’m currently editing the same source file you two are struggling to comprehend through your Dashboards and LSP. I used ⁠ed⁠. I’m already finished. Saved, closed, and I brewed a cup of tea in the meantime. When you two are done configuring your environments , let me know. Maybe I can teach you how to write a single line of code without AI assistance."

Vim_Chad: ...
Neo_Noob: ...
Ed_Geezer: ⁠q⁠

reddit.com
u/Pegasusw404 — 13 days ago
▲ 12 r/CLI

The Editor War

"Greg, you can’t just write code using ⁠cat << 'EOF'⁠ directly in the shell!"

Tyler protested, pointing at his glossy IDE with a pulsing AI subscription.

"Your setup has no syntax highlighting, no auto-complete, no linter! How do you even see your errors?"

Greg didn't even look up from his monochrome monitor.

"I see them in the exit code ⁠$?⁠," Greg muttered, hitting Enter. "If it's ⁠0⁠, the code is perfect. If you need a rainbow on your screen to know what you just typed, you're not an engineer - you're a house painter."

If you like short stories like this let me know, I’ll post more in the future! Thanks

reddit.com
u/Pegasusw404 — 13 days ago
▲ 0 r/CLI

The ⁠.conf⁠ of Silence

An old-school UNIX admin, who basically lived in a dark server room, was somehow convinced to go on a blind date.
They sat down at a restaurant, and the girl tried to break the ice:

„So, tell me about yourself. What are your passions? What do you do for fun?"

The admin stared at her, processing the input stream in his head, and replied:

cat /dev/biography | grep -i 'passions' | head -n 0⁠
The girl sat there, completely baffled. Dead silence filled the air for a solid three minutes. Finally, losing her patience, she asked:

„Are you seriously not going to say anything?"
The admin took a calm sip of water and said:

„No output means the operation was successful. Exit code: 0. Provide the next argument or close the session."

The girl stood up and walked out without a word.
The admin smiled to himself:

„Perfect. Standard output redirected to ⁠/dev/null⁠*. No redundant logs."*
He went back home, fired up his terminal, and returned to something that actually has long-term stability.

Moral of the story:
People waste way too much bandwidth on bloated GUIs and emotional packets. A truly stable system doesn't need small talk – it executes in silence.

reddit.com
u/Pegasusw404 — 14 days ago
▲ 54 r/CLI

A Day in the Life of a POSIX Engineer (or: Why your 8GB Python stack is crying)

Inside Room 101 of the Institute of Standards and Reliability, the walls are the color of a pure monochrome terminal. The only light source is a vintage green phosphor CRT monitor.

Meet Greg, a Senior Systems Engineer. Greg hasn’t used a mouse since 1994, dismissing it as an "unnecessary biological interface." His passion? Writing 42-byte pure ⁠/bin/sh⁠ scripts that manage entire municipal railway networks. His environment is bone-dry POSIX, running a lightweight MKSH shell with a standard ⁠xterm⁠ profile (16 colors, because why on earth would anyone need more?).

Suddenly, the door bursts open. In walks Tyler, a fresh bootcamp graduate whose resume reads "Python Ninja in 14 Days." Tyler smells of oat milk latte and carries a glossy MacBook Pro plastered with "I \heartsuit Web3" stickers.

"Greg!" Tyler shouts, adjusting his designer glasses. "I did it! I built the new microservice that automatically generates a morning motivational haiku and checks the terminal’s battery status!"

Greg slowly turns his head from the CRT monitor. His gaze meets Tyler’s.

"What did you build it in, kid?"

"Python 3.12, fully asynchronous!" Tyler beams. "I utilized FastAPI, Docker-Compose, a PostgreSQL database for logging, and a Next.js frontend to make it look gorgeous. Plus, the terminal output has full RGB, 16-million color gradients, and drop shadows under the font!"

Greg remains silent for exactly three seconds. To an operating system, that is an eternity.

"Show me."

Tyler proudly opens his MacBook. The fans instantly spool up to maximum RPM, sounding like an industrial vacuum cleaner. The screen begins scrolling massive walls of text:

[=== ] Downloading dependency 1 of 842...

[====== ] Compiling C-extensions for no reason...

WARNING: Your RAM is crying.

After three minutes, as the laptop casing reaches a critical temperature of 85°C, a beautiful, animated, 3D pulsing neon-purple battery chart finally appears on the screen. Below it, the text reads: ⁠Battery status: OK⁠.

"So?" Tyler asks, wiping sweat from his forehead. "Impressive, right?"

"Kid," Greg says calmly. "Your laptop just consumed more electricity than my refrigerator does over an entire weekend. Now look here."

Greg turns back to his terminal. On a mechanical keyboard that remembers when floppy disks were actually floppy, he types a single line of code:

echo "Status: $(cat /sys/class/power_supply/bat/status)"

The screen instantly spits out: ⁠Status: Discharging⁠.

Execution time: 0.001 seconds. Memory footprint: non-existent.

Tyler stares at Greg’s monitor, blinks a few times, and stammers:

"But... but Greg... Where is the type validation? Where is the multi-layered architecture? Where are the unit tests in PyTest?! It doesn't even have color! How is the user supposed to know it's a success if the text isn't green?!"

Greg sighs heavily. He reaches under his desk, pulls out a dusty, massive hardcover book titled IEEE Std 1003.1 (POSIX), and slams it onto the desk with a loud thud.

"Young man. A real engineer doesn't need green text to know a script worked. A real engineer checks the exit code ⁠$?⁠. If it's ⁠0⁠, it's a success. Now take your space heater out of my office before my coffee spoils from the ambient heat."

Tyler, crushed by the brutal efficiency of the pure shell, closes his laptop, grabs his oat milk latte, and heads to the marketing department to ask if they use ⁠/bin/sh⁠ over there.

Meanwhile, Greg goes back to writing an ⁠awk⁠ and ⁠sed⁠ pipeline designed to replace the Institute's entire cloud infrastructure.

Because in the world of POSIX, the rule is absolute: Keep It Simple, Stupid. Do one thing, and do it well.

reddit.com
u/Pegasusw404 — 15 days ago