Skip to main content

Posts

Showing posts with the label unix scripting practice exercises

(Tr|b)ash - Thoughts on Unix Scripting

Shell Scripting. The long and short of it is that bash is available for Unix systems, is relatively powerful, and for the most part, unchanging, scripting environment. Old Solaris Boxes, BSD machines, and every Linux box has bash available. Unlike python, if you have and older version of bash available, you are unlikely to even notice. So outside of a few people concerned with POSIX compliant shell scripting ( P1003.2 ) , you are probably doing your scripting in bash - its quite portable. The Unix shell generally is quite powerful. A Unix shell is a macro processor than executes programs. Most, including bash, come with relatively sophisticated string processing, in bash including left and right hand striping, tokenizing, and even regular expressions. Special features for working with files including redirection and globbing, as well as building tests for file attributes (writable?, directory? into the conditional test builtin. ([[ -e $FILE ]]) . Finally, the pipelined model of data fl