# Bash / shell scripting tips thread

**URL:** <https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212>\
**Category:** Operating Systems, Editors, and Tools\
**Tags:** gnu, linux, shell-scripting\
**Created:** [January 6, 2018, 6:38pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212 "2018-01-06T18:38:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [January 6, 2018, 6:38pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/1 "2018-01-06T18:38:53Z")

</div>

I’m cross-posting this from the chatroom in order to start a thread about bash tips.

> **[Ten Things I Wish I’d Known About bash – zwischenzugs.com](https://zwischenzugs.com/2018/01/06/ten-things-i-wish-id-known-about-bash/)**

The post covers:

- `` vs `$()`
- globbing vs regexps
- Exit Codes
- `if` statements, `[` and `[[`
- `set` commands
- `<()`
- quoting
- Top three shortcuts
- startup order
- getopts (cheapci)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [May 23, 2019, 4:39pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/2 "2019-05-23T16:39:39Z")

</div>

Here are some more resources:

- [the Art of the Command Line](https://github.com/jlevy/the-art-of-command-line)
- [Advanced Bash-Scripting Guide](https://www.tldp.org/LDP/abs/html/) ([PDF](http://tldp.org/LDP/abs/abs-guide.pdf))
- [The Bash Hackers Wiki](https://wiki.bash-hackers.org/)

---

<div class="post-metadata">

**Author:** ![PaulH](https://forum.codeselfstudy.com/letter_avatar_proxy/v4/letter/p/e495f1/32.png) [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Post date:** [June 28, 2021, 10:28pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/3 "2021-06-28T22:28:41Z")

</div>

I feel like this thread should be public. Any reason to keep it behind sign in?

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [June 28, 2021, 10:33pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/4 "2021-06-28T22:33:27Z")

</div>

Good idea. I just changed it to public. 🙂

---

<div class="post-metadata">

**Author:** ![PaulH](https://forum.codeselfstudy.com/letter_avatar_proxy/v4/letter/p/e495f1/32.png) [@PaulH](https://forum.codeselfstudy.com/u/PaulH)\
**Post date:** [June 28, 2021, 10:35pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/5 "2021-06-28T22:35:29Z")

</div>

Related post with a [list of common bash commands](https://forum.codeselfstudy.com/t/command-line-study-guide/1439)

---

<div class="post-metadata">

**Author:** ![Josh](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/josh/32/4_2.png) [@Josh](https://forum.codeselfstudy.com/u/Josh)\
**Post date:** [February 16, 2022, 7:04pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/6 "2022-02-16T19:04:57Z")

</div>

This looks useful.

> **[GitHub - dylanaraps/pure-bash-bible: 📖 A collection of pure bash alternatives to...](https://github.com/dylanaraps/pure-bash-bible)**
>
> 📖 A collection of pure bash alternatives to external processes.

---

<div class="post-metadata">

**Author:** ![Dan](https://forum.codeselfstudy.com/user_avatar/forum.codeselfstudy.com/dan/32/4311_2.png) [@Dan](https://forum.codeselfstudy.com/u/Dan)\
**Post date:** [February 16, 2022, 7:07pm UTC](https://forum.codeselfstudy.com/t/bash-shell-scripting-tips-thread/212/7 "2022-02-16T19:07:31Z")

</div>

Nice find!
