TheRepoClub-DotFiles/localbin/.local/bin/postcode
The-Repo-Club 5860bc6567
Update my Dotfiles
Signed-off-by: The-Repo-Club <wayne6324@gmail.com>
2022-02-06 11:54:40 +00:00

23 lines
744 B
Bash
Executable File

#!/usr/bin/env bash
#------------------------------------------------------------------------------
# Path - /usr/bin/postcode
# GitHub - https://github.com/The-Repo-Club/
# Author - The-Repo-Club [wayne6324@gmail.com]
# Start on - Thurs 12 Aug 16:24:07 BST 2021
# Modified On - Fri 28 January 2022, 05:14:13 pm (GMT)
#------------------------------------------------------------------------------
FILE=$@
if [ -f "$FILE" ]; then
isvalid=$(isutf8 $FILE)
if [[ -z $isvalid ]]; then
printf "%s exists uplading now...\n" "$FILE"
cat $FILE | gist -f $FILE
else
printf "%s does not have a valid UTF8 file type.\n" "$FILE"
fi
else
printf "%s does not exists.\n" "$FILE"
fi