There are so many commands available in bash that it’s impossible to know them all, and some commands are rarely run. Usually, you have to switch to your web browser to search for a solution or spending time reading through the manpage. In case you’d like to search for a specific command line you can now do so with borg script.
If you want to give it a try, you can install it in Linux as follows:
1 2 |
sudo wget https://github.com/crufter/borg/blob/master/builds/borg_linux_amd64\?raw\=true -O /usr/local/bin/borg sudo chmod 755 /usr/local/bin/borg |
Then run the script with your search query in quotes.
Some explanations for the output:
- () denotes hits for your query
- [] denotes possible solutions
- … under a [] means more lines to display
- a “–” in a solution means separate code examples extracted from the same source
Some queries are returning useful results such as “list all files in dir” as show in the screenshot above, but others not so, as least for now:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
borg "wipe email server clean" (1) Wakanda Server scripted clean shutdown [11] applicationWillStop - service wakanda stop - kill - kill -9 - HTTP Request Handler - service wakanda stop - kill - kill -9 - SharedWorker - HTTP Request Handler ... (2) Clean way to launch the web browser from shell script? [21] python -mwebbrowser http://example.com [22] #!/bin/bash if which xdg-open > /dev/null then xdg-open URL elif which gnome-open > /dev/null then gnome-open URL fi - #!/bin/bash ... |
This may improve in the future, as “adding a way to add entries and rate solutions” is part of the plan. The script queries a server running @ borg.crufter.com to look for solutions, but if you want your own it can also be self-hosted.
Via N0where
Jean-Luc started CNX Software in 2010 as a part-time endeavor, before quitting his job as a software engineering manager, and starting to write daily news, and reviews full time later in 2011.
Support CNX Software! Donate via cryptocurrencies, become a Patron on Patreon, or purchase goods on Amazon or Aliexpress
There is also “how2” which does the same, except for any topic easily answerable via google/stackexchange:
https://www.npmjs.com/package/how2
@Jan de Boer
That’s nice too. The output is much simpler and to the point too.
Installation in Ubuntu 16.04:
Quick test:
Hey guys!
Borg author here. Thanks for the feedback! You are right about the search result relevancy/usefulness. I did not explain this anywhere but one of the design goal was (big words for a program that was made in a couple of days of hacking) to be able to glance over a lot of potential solutions effectively – so I just grabbed the codes out of context – not so useful in every case – works perfectly in others.
I plan to tweak the search engine to give more relevant results, import more and cleaner data and give the ability to the user to rate the results and save and query their own snippets. The codebase is reasonably small, so it’s easy to get into.
Thanks for the support!
In the same spirit, but a bit different, a Python script doing Google searches in the command line: Googler -> https://github.com/jarun/googler