Skip to main content

WSL Cheatsheet

· One min read
Carlos Angulo Mascarell
Senior Platform Engineer

This post explains the next topics:

  • some tips when using the WSL (Windows Subsystem for Linux)

Format bash scripts for been used in Ubuntu

User Case

Let's say you are using Windows but you have some bash scripts for a Pipeline (Bitbucket or GH Action) you need to modify, if you install Ubuntu in the WSL you can call and tests those scripts. The only problems is that sometimes there is a formatting issue when Ubuntu tries to read them, the next code fix it:

sed -i 's/\r//' scripts/*.sh ;`

bashScripts=$(find ./ -type f -name "*.sh") ;\
for script in "${bashScripts[@]}"; do \
sed -i 's/\r//' $script; \
done

References

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