What we cannot speak about we must pass over in silenceLudwig Wittgenstein
Also relates to UNIX
I have had Cygwin sitting on my Windows OS for some time now, and only utilised it occasionally to get to grips with the intricacies of the UNIX system. I finally decided the other day to put it to work a bit, and start learning Shell scripting. The main incentive being that my text editors and macros were not reducing the workload enough in reworking old web sites to improved standards and accessibility levels. In only a few days graft, I am already revelling in the offerings of text utilities like SED, AWK, TR and GREP, and I have a few reasonable scripts to rework the content of some of my HTML files.
Google Search), but this repeatedly crashed my system, and the tools available in the Bash shell appear
var obj or
validate()). As an initial shell command, I came up with this little pipeline:
# place a dot separator in variable declaration sed -e 's/var /var./g' # place a dot separator in function declaration -e 's/function /function./g' # remove all comments -e 's///.*[a-z]$//' testfile | # remove all whitespace tr -d '[:space:]' | # remove dot separator in variable declaration sed -e 's/var./var /g' # remove dot separator in function declaration -e 's/function./function /g'
[ Back To Top ]
Copyright © 2002-2017 Severn Solutions.