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 Software Engineer with experience as Developer and DevOps. The technologies I have worked with are DotNet, Terraform and AWS. For the last one, I have the Developer Associate certification. I define myself as a challenge-seeker person and team player. I simply give it all to deliver high-quality solutions. On the other hand, I like to analyze and improve processes, promote productivity and document implementations (yes, I'm a developer that likes to document ๐งโ๐ป).
You can check my experience here.
Personal Blog - cangulo.github.io
GitHub - Carlos Angulo Mascarell - cangulo
LinkedIn - Carlos Angulo Mascarell
Twitter - @AnguloMascarell