Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/bin/bash
- consulta="$@"
- registro=$(cat custom.log | grep "$consulta" | tail -1)
- echo "Ultimo registro con '$consulta':"
- timestamp=$(echo $registro | cut -d " " -f 1)
- mensaje=$(echo $registro | cut -d " " -f 2-999)
- echo $(date -d @$timestamp) $mensaje
Advertisement
Add Comment
Please, Sign In to add comment