Check These Out
Replace 'csv_file.csv' with your filename.
Display recursive file list (newest file displayed at the end) and be free to access last file in the list simply by pressing arrow_up_key i.e. open it with joe editor.
BTW IMHO the list of files with newest files at the end is often more informative.
Put this 'lsa' function somewhere in your .bashrc and issue
$ . ~/.bashrc
or
$ source ~/.bashrc
to have access to the 'lsa' command immediately.
.
(the function appends command "joe last_file_in_the_list" at the end of command history)
You can use only awk
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video).
$ cat /proc/acpi/video/VGA/LCD/brightness
to discover the possible values for your display.
One of my favorite ways to impress newbies (and old hats) to the power of the shell, is to give them an incredibly colorful and amazing version of the top command that runs once upon login, just like running fortune on login. It's pretty sweet believe me, just add this one-liner to your ~/.bash_profile -- and of course you can set the height to be anything, from 1 line to 1000!
$ G=$(stty -g);stty rows $((${LINES:-50}/2));top -n1; stty $G;unset G
Doesn't take more than the below toprc file I've added below, and you get all 4 top windows showing output at the same time.. each with a different color scheme, and each showing different info. Each window would normally take up 1/4th of your screen when run like that - TOP is designed as a full screen program. But here's where you might learn something new today on this great site.. By using the stty command to change the terminals internal understanding of the size of your terminal window, you force top to also think that way as well.
# save the correct settings to G var.
$ G=$(stty -g)
# change the number of rows to half the actual amount, or 50 otherwise
$ stty rows $((${LINES:-50}/2))
# run top non-interactively for 1 second, the output stays on the screen (half at least)
$ top -n1
# reset the terminal back to the correct values, and clean up after yourself
$ stty $G;unset G
This trick from my [ http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html bash_profile ], though the online version will be updated soon. Just think what else you could run like this!
Note 1: I had to edit the toprc file out due to this site can't handle that (uploads/including code). So you can grab it from [ http://www.askapache.com/linux-unix/bash-power-prompt.html my site ]
Note 2: I had to come back and edit again because the links weren't being correctly parsed
Using this command you can track a moment when usb device was attached.
Shows all block devices in a tree with descruptions of what they are.
Merge all pdf files in the directory into one pdf file (the out.pdf file)
url can be like any one of followings:
$url="MejbOFk7H6c"
$url="http://youtu.be/MejbOFk7H6c"
$url="https://youtube.com/watch?feature=player_embedded&v=MejbOFk7H6c#t"
$url="//www.youtube.com/v/MejbOFk7H6c?hl=ru_RU&version=3&rel=0"
$url="http://www.youtube.com/embed/MejbOFk7H6c?feature=player_embedded"
If url mismatching, whole url will be returned.
Works great on Mac OSX.