Practical Regex Building: The Regex to Match the Files part of a Unix-Like Command (ls)

This post is part of a practical series on regex (regular expressions) in a bash shell. Setup Let’s make a shell script. In your favourite editor type #!/bin/bash And save it somewhere as test.sh. Now we need to make it executable as follows: [ahmed@amayem ~]$ chmod +x ./testt.sh [ahmed@amayem ~]$ ./test.sh Looks good so far.…

Practical Regex Building: The Regex to Match the Options part of a Unix-Like Command (ls)

This post is part of a practical series on regex (regular expressions) in a bash shell. Setup Let’s make a shell script. In your favourite editor type #!/bin/bash And save it somewhere as test.sh. Now we need to make it executable as follows: [ahmed@amayem ~]$ chmod +x ./testt.sh [ahmed@amayem ~]$ ./test.sh Looks good so far.…

ShellTree 1: Analyzing a one Line Command Implementation

This post is part of an educational series on building a shell script to graphically display the structure of a directory. While you are surfing your linux in command line, sometimes you want to be able to see the directory structure spread out in your terminal. I personally don’t know of any native command that…