This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if ! grep "GRUB_DEFAULT=saved" /etc/default/grub > /dev/null; then | |
sudo sed -i 's/^GRUB_DEFAULT=.*/GRUB_DEFAULT=saved/' /etc/default/grub | |
fi | |
echo | |
echo "== SELECT WHICH OS TO BOOT ==" | |
echo | |
sudo cat /boot/grub/grub.cfg | grep -oE "^menuentry '[^']+'" | awk -F\" '{print N++,$(NF-1)}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
WORDFILE="/usr/share/dict/words" | |
NUMWORDS=10 | |
#Number of lines in $WORDFILE | |
tL=`awk 'NF!=0 {++c} END {print c}' $WORDFILE` | |
for i in `seq $NUMWORDS`; do | |
rnum=$((RANDOM%$tL+1)); | |
sed -n "$rnum p" $WORDFILE; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
INCLUDE= | |
EXCLUDE= | |
COUNT= | |
while getopts ":i:e:m:ch" flag; do | |
case $flag in | |
i|include) INCLUDE="$OPTARG";; | |
e|exclude) EXCLUDE="$OPTARG";; | |
c|count) COUNT=1;; |
OlderNewer