VehiclesFashionRecipesBlogsHuntTravelsSportFunHandmadeITEducation
Mini-Games
x

x
zakruti.com » IT - Software » IT, programs, coding
Wget, Vim and The Bash Insulter DistroTube

Wget, Vim and The Bash Insulter DistroTube

FBTwitterReddit

video description

Rating: 4.0; Vote: 1
Wget, Vim and The Bash Insulter DistroTube I recently came across a script called Bash Insulter. It chooses a random insult every time you enter a wrong command. It's a nice, simple script. So let's hack on it a little. - https://www.gnu.org/software/wget/ - Wget - https://www.vim.org/ - Vim - https://www.gnu.org/software/emacs/ - Emacs - http://ergofabulous.org/luther/insult-list.php - Luther's Insults - https://www.nosweatshakespeare.com/resources/shakespeare-insults/ - Shakepeare's Insults - https://github.com/hkbakke/bash-insulter - Bash Insulter - https://gitlab.com/dwt1/bash-insulter - My Modified Bash Insulter
Date: 2022-03-30

Comments and reviews: 10


i got super impressed wt the way you removed spaces in front of each sentence... Thats something i havent seen done in a payed text editor in almost 30yrs... Yes, you could find and replace certain amount of spaces in a notepad; but(!!!) Itd also replace the same amount of spaces in the space after each sentence so that might break your form(ating). So to see a cli editor do this its just wow - ive witnessed the force i guess
reply

I can recommend looking into normal commands, they are incredibly powerful.
For example you can do stuff like -delete every line not containing this pattern- with something like -:g! //d-.
Then with normal vim magic like visual block mode you can remove the leading tags and spaces and then use something like -:%norm f

reply

Yahawah bahasham Yahawashi bahasham Rawach Qadash barak atham ( may the most high [Yahawah bahasham Yahawashi haMashiach] be with you )
PS: this is a blessing, so no need to put it in the spam folder or (if it is already there) to leave it there-

reply

Another way to go about the arrays, is just leave them in the file, one per line, no quotes. Then use the -readarray/mapfile- command from Bash.
readarray -t array2 < lutheran-insults.txt
readarray -t array3 < shakespearean-insults.txt

reply

May I suggest:
xmllint --html --xpath -//td[2]- insult-list.php > insults.txt
After that, it's a matter of replacing -- and -- by quotes, and replace stray -- by some fancy escape sequences (or just delete them.)

reply

hehehe. Good stuff. The OpenBSD sudo package will insult you _by default_ and the doas package, which many OpenBSD users prefer to sudo, also has some killer insults. And Gentoo has the infamous -offensive flag. -
reply

Hey there, I can't find a way to make it insult everytime and not only half... Removing the if isn't working and I don't know anything about bash nor do I have the time to accord it 2 more hours. Any help ?
reply

Very cool video. Packed with info. Very potent. I'll have to go over it a couple of times to make sure I got it all right but, that was great. Thanks Derek!
reply

Why a script? Create a cookie-file for fortune(6) and use -trap -eval fortune cookie-file- ERR- for bash or -TRAPZERR() - fortune cookie-file -- for zsh.
reply

The Lutherian insults were a great idea. Luther was a better insulter than Shakespeare. Is there a reason why you don't use gvim instead of vim?
reply
Add a review, comment






Other channel videos