Skip to content
/ ccdc Public

Some test scripts. probably shouldn't use them just yet..

Notifications You must be signed in to change notification settings

frosty939/ccdc

Repository files navigation

CCDC Stuff

Tips, Tricks, and Checklists
RHEL / CentOS Debian / Ubuntu
CCDC Event
Box Assignments (2019) Fundamentals (2019)
How To's
Splunk (CentOS 6) Bind9 (Ubuntu 12.04)

Helpful PS1

PS1="┌─[\`if [ \$? = 0 ]; then echo \[\e[32m\]✔\[\e[0m\];else echo \[\e[31m\]✘\[\e[0m\];fi\`]───[\`if [ \u = root ]; then echo \[\e[31m\]\u\[\e[0m\]; else echo \[\e[33m\]\u\[\e[0m\]; fi\`\[\e[01;49;39m\]@\H\[\e[00m\]]───[\[\e[1;49;34m\]\W\[\e[0m\]]───[\[\e[1;49;39m\]\$(ls | wc -l) files, \$(ls -lah | grep -m 1 total | sed 's/total //')\[\e[0m\]]\n└───▶ "

Global backupDir Variable

Short and easy, but prone to failures

backupDir="$HOME""/ccdc_backups/$(basename -s.sh "$0")"

A bit more of a pain, but significantly less prone to failures

backupDir="$HOME""/ccdc_backups/$(echo $BASH_SOURCE | sed 's|.sh$||' | rev | cut -d\/ -f1 | rev)"

About

Some test scripts. probably shouldn't use them just yet..

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published