Révision e451b022
Ajouté par Julien Enselme il y a plus de 9 ans
bin/log.sh | ||
---|---|---|
2 | 2 |
. /home/assos/bin/scripts-config.sh |
3 | 3 |
|
4 | 4 |
log=$(cat) |
5 |
command="$1" |
|
5 | 6 |
|
6 | 7 |
current_day=$(date "+%Y-%m-%d") |
8 |
current_time=$(date "+%H-%M-%S") |
|
7 | 9 |
log_file="${d7_dir_log}/${current_day}.log" |
8 | 10 |
|
9 |
echo "$log" > "${log_file}" |
|
11 |
echo -e "%%%% ${command} — ${current_time}\n${log}\n%%%% END\n" > "${log_file}" |
Formats disponibles : Unified diff
Modify log.sh and .unlog to use group.