shell-入门

dos2unix start.sh

在windows系统下编写的shell脚本 在liunx下进行一次转译,否则会爆出 command not found 的error;

1 #!/bin/sh
2 send=`date '+%Y-%m-%d %H:%M%:%S'`
3 
4 echo $send

格式化当前系统时间

原文地址:https://www.cnblogs.com/My-Cloud/p/4481327.html