Redirected there from dangh/zed-awk#1. Suppose you have a part of this sample shell script:
$_comp_command1 2>/dev/null |
sed -r 's/(-[[:alpha:]-]+, )+(--[[:alpha:]-]+)+/\2/' |
sed -r 's/^[[:space:]]+([[:alpha:]-]+)+[[:space:]]+/\1|/' |
grep -E '^(--)?[[:alnum:]-]+\|[[:alpha:]]' |
awk -F '|' '{ $2 = toupper(substr($2,1,1)) substr($2,2); print $1, "|-- ", $2 }' |
column -s '|' -t
I'm talking about highlighting this specific part:
{ $2 = toupper(substr($2,1,1)) substr($2,2); print $1, "|-- ", $2 }
