jabbrv
jabbrv copied to clipboard
Fix various style and security issues in shell scripts:
- Use
--so that variables or globs that expand to names with dashes don't become command-line options - Use
$(...)instead of legacy`...` - Quote variables when necessary to prevent globbing
- Remove extraneous semicolons at ends of commands
- Remove extraneous invocations of
cat - Use built-in
${var//x/y}or${var/%x/y}instead ofecho $var | sed s/x/y/ - Use
while trueinstead ofwhile [ 1 ] - Use
-rwithreadto avoid mistaken interpretation of escape codes - Use
[:lower:]and[:upper:]instead ofa-zandA-Zwithtrto support non-ASCII characters