Bash expansion explained for beginners. Learn brace, tilde, parameter, command, arithmetic, process, globbing, word splitting, and quote removal with practical examples.
Full guide here: ostechnix.com/bash-expansi...
#BashExpansion #Bash #ShellScripting #Linux #Linuxhowto
#!/bin/bash files=$(ls bc*.ppm) numfiles=$(ls $files | wc -l) numpages=$((numfiles*2)) frontat=1 backat=$numpages for file in $files; do filewidth=$(pamfile -size $file | awk '{print $1}') pagewidth=$((filewidth/2)) pamcut -right $pagewidth $file >| left.ppm pamcut -left $((pagewidth+1)) $file >| right.ppm if ((frontat % 2 == 0)); then mv left.ppm split$(printf %02d $frontat).ppm mv right.ppm split$(printf %02d $backat).ppm else mv right.ppm split$(printf %02d $frontat).ppm mv left.ppm split$(printf %02d $backat).ppm fi ((++frontat)) ((--backat)) done
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
Level up your shell scripting skills
awk helps you extract columns, apply conditions, and generate reports
Simple syntax. Serious power.
#LearnLinux #ShellScripting #SysAdminLife #DevJourney
Bash turns 38 today! Celebrate Bash's 38th birthday with 38 built-in features and essential tips. Learn keyboard shortcuts, parameter expansion, conditionals & more.
Full guide here: ostechnix.com/38-bash-tips...
#Bash #Shell #Bash38 #Linux #Bashtips #Shelltips #Shellscripting
Looks like black magic at first glance… but it actually works!
This script is a hands-on mini-lesson in associative arrays (maps) and other cool zsh-tricks. Think of it as a tiny config manager for your zsh setup on Linux.
Still, zsh syntax is blowing my mind.
#ShellScripting #Linux #Zsh #DevMagic
I used my free time to learn some #shellScripting in #linux.
It's fun, but the #zsh syntax is wild! 💻
My terminal now judges me for every typo. x)
#Coding #CodeNewbie
I use git in a shell because that's just what I prefer, and I have a lot of aliases set up to shorten commands, e.g. just "g" will be git commit, "gp" is git push etc.
I just realized that this also gives me some safety. I use PageUp to complete the currently typed thing to the last command I […]
Also developed scripting fluency — automating repetitive tasks and managing configurations with precision. 🧠
It’s one thing to know Linux; it’s another to make it work for you.
#Automation #ShellScripting
#PSA regarding #GNU #coreutils #sort's unexpected or at least non-intuïtive behaviour of its --unique (-u) option together with --numeric (-n) or --humane (-h).
The output of piping something through
sort -nu
might not be equal to the output of piping the same thing through
sort -n | uniq […]
Fish Shell 4.1.0 è qui! Nuove funzioni, sintassi migliorata e un terminale ancora più intuitivo per Linux. #FishShell #LinuxTerminal #ShellScripting #OpenSource #CLI
Many users enhance Zoxide with custom shell aliases or functions, e.g., `z foo` for `cd $(zoxide query foo)`. Integrating it into your dotfiles workflow maximizes its utility and personalizes your shell experience. #ShellScripting 4/6
Quick #Bash alias for the day.
alias wrap='fold -sw 80'
#shellScripting
Bash isn't just a shell — it's a superpower 🧠💻
🔁 Loops
🗂️ File automation
📜 Scripts that replace 100s of clicks
Mastering Bash means controlling your system like a pro. #Bash #Linux #ShellScripting
Table 1: Remove shortest length string starting from left, use #. From right? Use %. To remove longest length string starting from left, use ##, with %% for from the right. Table 2: The various combinations of expansions and wildcard/period placement for extracting file stem and suffix. Most do not work. To extract file name/stem from shell expansion, use %.* and to extract the suffix, use ##*.
Tired of fumbling through which is which, I made these tables to understand expansion (for my primary use case) better. Hopefully I’ll remember I left this here. #shell #scripting #shellscripting #bash #expansion
Here's a #ShellScripting puzzle. Suppose you have a shell script run with the "-e" flag, i.e., it's supposed to exit immediately if a command exits with a non-zero exit status. But there's one particular command you want to capture the exit status of so you can check if it's a particular failure […]
HN discussed tab completion across Bash, Zsh, and Fish shells. The conversation covered ease of use, configuration, and shortcomings, debating the trade-offs between convenience & control, and the potential for standardization. #ShellScripting 1/5
I automated building new project folders with shell scripting + Keyboard Maestro. Had more fun doing that than starting my ScreenCastsONLINE project. Thanks, Mike Burke & don't tell @leegarrett.bsky.social
www.podfeet.com/blog/2025/08...
#Automation #ShellScripting #KeyboardMaestro
This photo depicts parts of a script code and a GUI to perform API requests on a HortusFox workspace instance.
I created an AquaShell script to quickly and easily run API requests on a HortusFox workspace instance. 😀
Here is the script:
www.aquashell-scripting.com/examples#hor...
#coding #programming #scripting #shellscripting #automation #programminglanguage #indiedev
A script that resets docker WSL data, can be found here: https://www.aquashell-scripting.com/examples#reset-docker-wsl-data
Sometimes small scripts are quite helpful.
For instance if your docker wsl data grows more and more, so you just want to reset it to gain disk space.
www.aquashell-scripting.com/examples#res...
#docker #wsl #scripting #shellscripting #programming #coding #programminglanguage
Give your shell scripts a refresh with Modernish! Simplify complex tasks & make them more maintainable. Learn more: https://github.com/modernish/modernish #shellscripting #devops"
In Chapter #10 of the LFCS certification, understand the difference between terminals and shells, and start writing your own shell scripts.
📖 Read the full guide (Pro members only):
👉 pro.tecmint.com/understandin...
Follow @tecmint.bsky.social for more #Linux tips and #ShellScripting guides!
Check out my @itch.io article on how I made a #videogame in my own #programminglanguage
itch.io/t/5056205/ev...
#gamedev #indiedev #screenshotsaturday #gamedevelopment #scriptinglanguage #scripting #shellscripting #proofofconcept #aquashell
Optimize your shell scripts with Koala: a benchmark suite that turns research into science. No more guesswork, just measurable results. Check it out: https://github.com/kbensh/koala" #shellscripting #optimization
💻 ¿Trabajas con 𝗟𝗶𝗻𝘂𝘅 y no dominas 𝗕𝗮𝘀𝗵?
En este post te contamos:
📌 Qué es Bash
📌 Comandos esenciales
📌 Cómo crear tus primeros scripts
Ideal para quienes están dando sus primeros🔗 Lee más: https://f.mtr.cool/tbwyqpquni
#Bash #Linux #Automatización #ShellScripting #DevOps
Shell scripting Full Course | Bash Scripting Mastery: From Basics to Advanced Shell Programming 2twu.com/post/7500236...
#bash #sh #linux #shellscripting #cli #programming #sysadmin
🧩 What do you call parameters that are optional—until another one is used, making them required? Example: A flag you don't need on its own, but must include when paired with another. Is there a standard term for this in #Bash or #ShellScripting? #Linux #Scripting