How to highlight output with grep instead of filtering

Looking for bits of information swirling past you on the screen can be tiring. Thanks to grep one can filter out unneeded text. But what if you want to display everything and just highlight text that you think is relevant? Image ping for some information and an error gets filtered out since you didn’t explicitly search for it (because all YOUR code free from errors, right? 😉 ). Well, turns out grep can do just that:

An example that I just used:

Credit goes to user holygeek on stack overflow.

UPDATE: One function to extract them all!

UPDATE: There is a Python script that has some extra features (like extraction into a dedicated directory and changing of permissions).

I seriously fail to remember all those tar options for each of the supported archives 🙂 So I’m happy to have found a bash function that will simply chose the right command based on the file extension:

Simply put the function at the bottom of your .bashrc file. Either close and re-open the terminal you’re using or type source ~/.bashrc to refresh the changes of your bash environment.

Now you can just type extract your_archive_here.xyz and the function will extract the archive and cd into it. Super time-and-brain-energy-saver! 😛 I found this function on the Ubuntu forums in a post by user graysky.

UPDATE: Bluetooth Low Energy dongles with Linux compatibility

UPDATE: I got my hands on another BTLE capable dongle and added it below with the other CSR8510 dongles.

This is a short investigation of Bluetooth Low Energy USB dongles that have been reported to work in Linux or officially claim Linux support.

Plugable USB-BT4LE
– Web: http://plugable.com/products/usb-bt4le
– Advertised as linux compatible
– Mode: dual mode
– BT chip: Broadcom BCM20702
– Tested by Michael Saunby on Ubuntu 12.10
– Note: I own one of those and had to jump through some hoops to get it to work – but that’s another blog post to come.

Other dongles based on the Broadcom BCM20702:
GMYLE Micro USB Bluetooth 4.0 Dongle

Delock Adapter USB 2.0 Bluetooth V4.0 Dual Mode
– Web: http://www.delock.com/produkte/F_270_USB-Adapter_61889/merkmale.html
– Advertised as linux compatible (according to data sheet)
– Mode: dual mode
– BT chip: unknown

SPEEDLINK VIAS Nano USB Bluetooth Adapter
– Web: http://www.speedlink.com/?p=2&cat=271&pid=20182
– Mode: dual mode
– BT chip: CSR8510
– Tested by Raspberry Pi forum user killkrt on a Raspberry Pi running Raspbian

Other dongles based on the CSR8510:
– Sitecom CNT-524 Bluetooth 4.0 USB dongle (reported working by Thomas Rücker)
Inateck’s BTA-CSR2W, BTA-CSR4B1, BTA-CSR4B2, BTA-CSR4B3, BTA-CSR4B5
CSL – USB nano Bluetooth-Adapter V4.0: I bought one of those and it does work out-of-the-box:

Bluegiga BLED112
– Web: http://www.bluegiga.com/en-US/products/bluetooth-4.0-modules/bled112-bluetooth-smart-dongle/
– Mode: single mode
– BT chip: Texas Instruments CC2540
– Tested by: Tamás Fábián
– Note: The BLE112 the dongle is based on also has a virtual com port feature and comes with a C API. This is great for developers who want/need to dig into the BLE protocol (i.e. develop their own BLE-enabled embedded devies). Bluegiga also has their own programming language called BGScript that more abstract than C and easier to get into if you don’t know C. However, in order to flash your BGScript applcication onto a BLE112 you will need the Texas Instruments CC Debugger (a USB box and corresponding software). I have successfully used the BLELabs BLE112-Protostick in Ubuntu 12.04 LTS.