(1)sed: cat file | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/' (2)tr: cat file | tr a-z A-Z cat file | tr "[:lower:]" "[:upper:]" ( ...
(1)sed:
cat file | sed 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'
(2)tr:
cat file | tr a-z A-Z
cat file | tr "[:lower:]" "[:upper:]"
(3)perl:
$string="abcdef";
$string =~ tr/[a-z]/[A-Z]/;
or
$string=uc($string); #大小轉小寫用lc,具體參見perldoc -f lc與perdoc -f uc