Skip to main content

Bash Scripts Cheatsheet

· One min read
Carlos Angulo Mascarell
Senior Platform Engineer

This post list bash commands and scripts I use the most.

Execute a command inside subfolders

function recursive_for_loop {
ls -1| until ! read f; do
if [ -d $f -a ! -h $f ];
then
cd -- "$f";
recursive_for_loop
echo "### Folder $f";
git status; # replace here your command

# use recursion to navigate the entire tree; git status;
cd ..;
fi;
done;
};
recursive_for_loop

Source: baeldung.com/linux/execute-command-directories

About me

I'm a Senior Platform Engineer. I build and evolve Internal Developer Platforms — golden paths, self-service tooling, and paved roads spanning AWS governance, CI/CD standardization, and developer enablement — so engineering teams ship faster, safer, and more autonomously, with less cognitive load. My core stack is AWS, Terraform, and GitHub Actions, and I'm an AWS Certified Solutions Architect. I care deeply about paved roads, productivity, and documenting implementations so knowledge scales with the team (yes, I'm an engineer who likes to document 🧑‍💻).

You can check my experience here.

Personal Blog - cangulo.github.io GitHub - Carlos Angulo Mascarell - cangulo
LinkedIn - Carlos Angulo Mascarell

Did you like it? Share It!


Comments