求shell脚本编写,该怎么解决 Home » IDC云服务 » 求shell脚本编写,该怎么解决 求shell脚本编写新手,求教大神,用awk编写一个简单的shell脚本: 输入当前时间,运行脚本获取到上个月的当前时间。 感激! date -d"1 month ago" +"%y%m%d" date -d "1 month ago" +"%y%m%d" | awk ‘{print $1}’ %y%m%d输出格式 date -d"1 month ago" +"%y%m%d"110803 date -d"1 month ago" +"%Y%m%d"20110803