C Shell Scripting/snippets
Tools
General
Sister projects
In other projects
How to lower and upper case a string using thetr command.
#!/bin/csh -fsetDS=\$aliaslowertr'A-Z''a-z'aliasuppertr'a-z''A-Z'aliasrot13"tr 'A-M N-Z a-m n-z' 'N-Z A-M n-z a-m'"aliasltrim"sed 's/^[ \t\n\r]*//'"aliasrtrim"sed 's/[ \t\n\r]*$DS//'"aliastrim"sed 's/^[ \t\n\r]*//;s/[ \t\r\n]*$DS//'"echoHello|lowerechoHello|upperechoHello|rot13echo" yabba dabba do"|rtrimsetHELLO=" hELLO "if(`echo$HELLO|lower|trim`=="hello")thenecho"match"endif