1
vote
2answers
76 views

How to invoke a shell built-in explicitly?

I want to customize the functionality of cd command as per my needs. I define following function - function cd () { cd "$@" && pushd "$@"; } The intent of this function is to automatically ...
7
votes
2answers
239 views

Possible to use brace (permutation) and array expansion simultaneously?

Bash's {} brace expansion syntax allows for creating easy permutations # echo {b,c,d}{a,e,i,o,u} ba be bi bo bu ca ce ci co cu da de di do du However it's not clear to me if/how it's possible to ...
17
votes
7answers
2k views

What purpose does the colon builtin serve?

I've hacked on a lot of shell scripts, and sometimes the simplest things baffle me. Today I ran across a script that made extensive use of the : (colon) bash builtin. The documenation seems simple ...