9.26.2013

Tips for Unix scripting

I had been creating sequence diagrams for some of the more complicated ksh scripts I've written. And, I still feel this is a great idea for scripts of any great complexity. However, I've also begun using a simple 'call structure' grep where I'll take a main script and subs like so:
grep "\. \." main.ksh >../_DOC/main.callstruct.txt 
. ../_CMD/sub1.ksh 
. ../_CMD/sub2.ksh
grep "\. \." sub1.ksh >>../_DOC/main.callstruct.txt 
...
grep "\. \." sub1.ksh >>../_DOC/main.callstruct.txt 
...

...also, have begun running - redirecting the scripts to an output ../_TEST/main.test.txt file and checking this in along with the other components. And the ../_DOC/main.callstruct.txt file.

No comments:

Post a Comment