Skip to content

Instantly share code, notes, and snippets.

@sudipidus
Created January 24, 2018 07:12
Show Gist options
  • Save sudipidus/00c986e0e164576f099daea13cfe0f63 to your computer and use it in GitHub Desktop.
Save sudipidus/00c986e0e164576f099daea13cfe0f63 to your computer and use it in GitHub Desktop.
#!/bin/bash
server="$1"
lines=100
echo server is $server
if [ "$#" -eq 2 ]; then
lines="$2"
fi
echo lines are $lines
logfile=/root/logs/staging$server/logfile.log
echo Opening $logfile
tail -f -n $lines $logfile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment