Skip to content

Instantly share code, notes, and snippets.

View williamcanin's full-sized avatar
🐍
Simple is better than complex.

William C. Canin williamcanin

🐍
Simple is better than complex.
View GitHub Profile
@williamcanin
williamcanin / progress_percent.sh
Last active August 29, 2015 14:27
ProgressPercent. As parameters option beginning, end, seconds and message text.
#!/bin/bash
# Type script: Shell
# Program: Progress percent
# Description: Shell script function to demonstrate a process according with percentage inserted seconds.
# Version: 1.0.0
#
#------------------------------------------Using --------------------------------------------
# _PROGRESS_PERCENT "begin_percent" "end_percent" "seconds_time_of_progress" "message"
#
# NOTE: For cancel process, using: Ctrl+C
@williamcanin
williamcanin / if_case.sh
Last active August 29, 2015 14:27
Test If and Case using "Curl -L" through Gist
#!/bin/bash
# Test If and Case using "Curl -L" through Gist
#
#
if [[ "$(id -u)" != "0" ]]; then
echo "You are not root!"
echo "You have the root password? (y/n)"
read -p "Reply: " reply