1、文件名大小写转换:
(1)大写转小写:
ls | awk '{printf("mv %s %s ", $0, tolower($0))|"sh"}'
(2)小写转大写:
ls | awk '{printf("mv %s %s
", $0, toupper($0))|"sh"}'
2、关于bc:
(1)二进制计算:
echo "obase=2;ibase=2;00111100111+00111100111"|bc
(obase:输出进制;ibase:输入进制)
3、批量压缩:
for n in `ls`;do tar -jcvf $n.tar.bz2 $n;done