日期:2014-05-16 浏览次数:20941 次
[nicenight@CSDN ~]$ echo "aaa,bb,03/12/2012:02:11:13,dd"
------解决方案--------------------
awk -F"[,/:]" '{print $0","$5$4$3$6$7$8}'
aaa,bb,03/12/2012:02:11:13,dd,20121203021113
[root@vps616 shell]# cat main.sh
#!/bin/bash
t=`echo "aaa,bb,03/12/2012:02:11:13,dd"
------解决方案--------------------
awk -F',' '{print $3}'
------解决方案--------------------
sed 's/:/ /'`
echo `date -d"$t" +"%s"`
[root@vps616 shell]# sh main.sh
1331489473