1 2 3 4 5 6 7 8 9 10 11 12 13
#!/bin/bash VM_LOG=%LOG_DIR%/$1 VM_ACTION=$2 if [ $VM_ACTION = "release" ]; then if [ ! -f "${VM_LOG}_console.log" ]; then return 0 fi NOW=$(date +"%d-%m-%Y-%H:%M:%S") mv "${VM_LOG}_console.log" "${VM_LOG}_console_${NOW}.log" fi