With regular access to linux for not just work stuff, I’m trying to do things with media files to work appropriately with Jellyfin and ffmpeg is the go to. Not wanting to do everything by hand, I turn to scripts. I found a lovely script, but it’s set up to be manually edited or limited to working from specific directories and I want to be more flexible.

So now I must learn to go beyond the basics (I’ve already done input prompts): working with and validating arguments.

I made my little sample script to use as reference because relying on Internet searches these days to find obscure answers (or reading dry documentation that doesn’t immediately cover what I’m trying to do) just doesn’t cut it. 😅

Oops. Got distracted with figuring out how I want the emoji picker to work. Where was I…

Ah, yes. I’m leveling up my bash scripting skills.

#bash #ShellScripting #Linux

I got annoyed at having to know how many lines I want to `head` or `tail`, and having to write the same stuff over and over again using `cat -n` / `grep` (or even worse an awk script) to figure them out on the fly, so ... two new scripts, `ignore-after` and `ignore-up-to` which are basically content-based versions of `head` and `tail`.

You're welcome.

https://github.com/DrHyde/shellscripts/commit/73b79e211ebaacbb9bc4f296fd1db6d2174b6f9e

#ShellScripting #shell #unix

ignore-after and ignore-up-to: content-based versions of head(1) and … · DrHyde/shellscripts@73b79e2

…tail(1)

GitHub

Bash expansion explained for beginners. Learn brace, tilde, parameter, command, arithmetic, process, globbing, word splitting, and quote removal with practical examples.

Full guide here: https://ostechnix.com/bash-expansion-beginners-guide/

#BashExpansion #Bash #ShellScripting #Linux #Linuxhowto

Bash Expansion: The Complete Beginner's Guide (2026) - OSTechNix

Learn all Bash expansion types with practical examples and clear explanations of execution order, globbing, word splitting, and quoting rules.

OSTechNix
Here's a little puzzle for you. Can you figure out the purpose of this one-off shell script I just wrote?
If you post an answer put it behind a CW so you don't spoil it for others!
#programming #scripting #shellScript #shellScripting #Linux

If you’re writing shell scripts, start adding this:

set -euo pipefail

It forces your script to:
• Exit on errors
• Fail on unset variables
• Catch broken pipes

Small line. Big reliability boost.

#TechTipThursday #Linux #ShellScripting #SysAdmin

https://bashtorio.xyz/

"Bashtorio: Build conveyor belt factories that process data through real Unix commands running in an in-browser Linux VM. A Factorio-inspired browser game."

#game #bash #shell #unix #Linux #ShellScripting

Bashtorio - Unix Pipe Factory

Build conveyor belt factories that process data through real Unix commands running in an in-browser Linux VM. A Factorio-inspired browser game.

Am I the only one that never, ever uses getopt/getops in shell scripts?

Just writing your own argument parser seems so much easier to do. :/

#Unix #shell #bash #ShellScripts #ShellScripting

Se vienen cositas próximamente en el blog y en el canal de YouTube 💪

Intentando aclarar algunos conceptos fundamentales de SSH para poder utilizarlo como un pro y no morir en el intento 🚀

¿Todavía no nos siguen? 👇

▶️ https://www.youtube.com/juncotic?sub_confirmation=1

📚 https://juncotic.com/blog

🎓 https://juncotic.com/cursos

¡Los esperamos para seguir aprendiendo juntos!

#gnu #linux #ssh #curso #firewall #iptables #nftables #wireshark #redes #tcpip #ciberseguridad #python #flask #shellscripting #juncotic

File this under #shell #functions I should have written years ago:

function grepc { #Do a grep -c, but skipping files with no results grep -c "$@" |grep -v ':0$' }

#unix #UnixShell #ShellScripting #bash #ksh

P.S., the body of the parent #toot was created by a simple #shell #function:

function apod { #Today's NASA Astronomy Picture of the Day info-fetcher curl -sL 'https://apod.nasa.gov/apod/archivepix.html' \ |grep -m1 "[0-9][0-9]:" \ |sed 's/^/Date: /; s|: *<a href="|\nURL: https://apod.nasa.gov/apod/|; s/">/\nTitle: /; s/<.*$//' echo echo "#NASA #Astronomy #PictureOfTheDay" }

#bash #ksh #mksh #shellScripting #unix #UnixShell #WebScraping #Scraping #HTML