Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back > Blogs > Lumak's Guide to Random Things
User Name


OK I don't really have a good title yet but I figure I can post works in progress and other tips I've come across or other interesting things.
Random Bash Scripts A small collection of useful and intriguing bash scripts.

having fun with bash varaibles: indirect variable references

Posted 11-28-2009 at 01:38 PM by lumak (Lumak's Guide to Random Things)
Updated 11-28-2009 at 02:59 PM by lumak

Well I recently started messing around with bash scripts as cgi scripts and was wondering how to pass variables in and what not.

Well it turns out, Apache will define the variable $QUERY_STRING which will contain everything after the first question mark. You can then pars this string to define variables. The general format is "name1=val1&name2=val2". It turns out you can actually declare variables in bash using 'declare' and parameter expansion.

Attached Files
File Type: txt cgi_vars.txt (2.4 KB, 529 views)
Views 5180 Comments 2 lumak is offline

Slackware64 nvidia-driver-compat32

Posted 09-17-2009 at 03:45 PM by lumak (Lumak's Guide to Random Things)
Updated 06-10-2010 at 01:16 PM by lumak

EDIT: I added a new script for 195.36.24 as well as a script to compile libvdpau-compat32 on a 64 bit system. I never hear any feedback on this stuff... is it working for other people? Do I have errors anywhere?

I'm one of those people that personally don't like installing things on my system without having proper packages made for tracking the files. As such I edited the scripts on for an additional package to support this.
Attached Files
File Type: txt nvidia-switch32.txt (9.1 KB, 846 views)
File Type: txt nvidia-driver-compat32-195.32.24.SlackBuild.txt (4.0 KB, 12 views)
File Type: txt libvdpau-compat32.SlackBuild.txt (2.7 KB, 9 views)
Views 2455 Comments 1 lumak is offline

man to pdf converter

Posted 09-08-2009 at 04:21 PM by lumak (Lumak's Guide to Random Things)
Updated 09-22-2009 at 12:31 AM by lumak

while it was fun to do, this was actually completely useless. Just hotkey your terminal and type "man'! Original post as follows.

I recently got a tablet PC and instantly wanted to fill it with a wealth of knowledge. This lead me to want PDFs of the man pages. Luckily, man can output in post script and there is a ps2pdf converter on most Linux distributions... But you may not want to convert them manually and you may want a nice folder structure for them....
Views 1498 Comments 0 lumak is offline

One Liner Dependency Check for existing binaries

Posted 12-03-2008 at 11:15 PM by lumak (Lumak's Guide to Random Things)
Updated 12-03-2008 at 11:16 PM by lumak

I ran across this a while ago and was reminded of it recently. I'm placing it here for safe keeping in case I ever need to do a full install of gnome to compile a program just to find the 26 specific dependencies it needs so that everything else can be uninstalled (did I say gnuCash? you lie! it works on all modern OS's... well except for slackware

# Find out all the needed dependencies of a binary

objdump -x $1 | grep NEEDED
Views 3244 Comments 2 lumak is offline

USB drive auto mounter script!

Posted 11-30-2008 at 11:35 PM by lumak (Lumak's Guide to Random Things)

Yes that's right! I kid you not! A marvelous bash script to automatically mount a usb flash drive (or at least set it up to mount it by users) it is commented and should be 'easy' to follow. There are probably better ways to do this, but at the time I didn't want to install anything (e.g. pmount) and I didn't feel like using autofs.

what does the script do if it doesn't automatically mount the drive?
- It determines an appropriate mount name from the file system label or...
Views 2983 Comments 0 lumak is offline


All times are GMT -5. The time now is 09:30 PM.

Main Menu

Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration