Skip to content

Instantly share code, notes, and snippets.

@1a57danc3
Last active January 5, 2021 01:31
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save 1a57danc3/aa936fe51acd064ea25e to your computer and use it in GitHub Desktop.
Save 1a57danc3/aa936fe51acd064ea25e to your computer and use it in GitHub Desktop.
FBI WARNING SSH NOTIFICATION
#!/bin/bash
# Find out current screen width and hight
_COLUMNS=$(tput cols)
# Set default message if ( input not provided
_MESSAGE=" FBI Warining "
# Calculate x and y coordinates so that we can display $MESSAGE
# centered in the screen
y=$(( ( $_COLUMNS - ${#_MESSAGE} ) / 2 ))
spaces=$(printf "%-${y}s" " ")
# Alright display message stored in $_MESSAGE
echo " "
echo -e "${spaces}\033[41;37;5m FBI WARNING \033[0m"
echo " "
echo "Federal Law provides severe civil and criminal penalties for the unauthorized reproduction, distribution, or exhibition of copyrighted motion pictures (Title 17, United States Code, Sections 501 and 508). The Federal Bureau of Investigation investigates allegations of criminal copyright infringement"
_COLUMNS=$(tput cols)
# Set default message if ( input not provided
_MESSAGE="(Title 17, United States Code, Section 506)."
# Calculate x and y coordinates so that we can display $MESSAGE
# centered in the screen
y=$(( ( $_COLUMNS - ${#_MESSAGE} ) / 2 ))
spaces=$(printf "%-${y}s" " ")
# Alright display message stored in $_MESSAGE
echo -e "${spaces}(Title 17, United States Code, Section 506)."
echo " "
@4679
Copy link

4679 commented Oct 19, 2015

赞!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment