LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Blogs > Lumak's Guide to Random Things
User Name
Password

Notices

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.
Old

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)
Member
Views 5862 Comments 2 lumak is offline
Old

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?


ORIGINAL POST:
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 SlackBuilds.org 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)
Member
Views 2483 Comments 1 lumak is offline
Old

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

EDIT:
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....
Member
Views 1534 Comments 0 lumak is offline
Old

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

Code:
#!/bin/sh
#
# Find out all the needed dependencies of a binary

objdump -x $1 | grep NEEDED
...
Member
Views 3271 Comments 2 lumak is offline
Old

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...
Member
Views 3058 Comments 0 lumak is offline

  



All times are GMT -5. The time now is 06:54 PM.

Main Menu
Advertisement

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