Archive for utility

[tekwalk] xopen : shell function to have verbose xdg-open : Mac’s “open” alternative for Linux

Posted in AbhishekKr, Blogroll, install-on-linux with tags , , , , , , , on March 4, 2014 by abhishekkr [13/Feb/2014]

I have been using xdg-open for sometime now, it’s a utility similar to “open” utility popular among MacOSx users.

It enables you to open any file in the default “open with” program assigned to it’s type. So, just passing any type of file to this utility would let you open it in the program it’s supposed to open.

What is xdg-open?

There is just this little shell function, that makes your xdg-open usage a bit more verbose in case of errors (bad-syntax/ghost-file/ghost-program/open-failure) faced about the reason for it. And also shortens the access util name obviously.

xopen ()
xdg-open “$@”;
if [ “${_TMP_EXITCODE}” == “1” ]; then
echo “[ERROR:] Error in command line syntax”;
if [ “${_TMP_EXITCODE}” == “2” ]; then
echo “[ERROR:] One of the files passed on the command line did not exist”;
if [ “${_TMP_EXITCODE}” == “3” ]; then
echo “[ERROR:] A required tool could not be found”;
if [ “${_TMP_EXITCODE}” == “4” ]; then
echo “[ERROR:] The action failed”;

…read full blogpost here

[a.Bionic] auto-download all media from any RSS – eg. DefCon20 Talk Videos

Posted in ABK Labs with tags , , , , , , on November 28, 2012 by abhishekkr

@ [27/Nov/2012]

a shell utility code for download all media present as enclosures in any RSS

eg. usage to download all slides video of DefCon20
$ ddl-rss-media

to install it
$ sudo curl -L -o /etc/profile.d/

… here to read full post