[Bash] A simple log file with script
Create a logger.sh file
#!/bin/bash
echo `date +'%T %F'` $* >> `date +%F`.log
$*: Represents all script arguments
Example
$ logger hello
$ logger hello world
Script will save hello and hello world into the log file

浙公网安备 33010602011771号