489 reputation
39
bio website sourceforge.net/projects/…
location Northeast
age
visits member for 3 years, 2 months
seen 12 hours ago

Long time Linux user (currently kubuntu). Use Windows 98, and 7 when I have to. Programmed in many languages, currently using bash and awk for most things. Learning Python.

Have one project on sourceforge:

Duplex printing emulator for non-duplex printers (Linux)


Mar
17
comment Securely reading and parsing a string from a parameter or file in bash
The application I'm currently working on is a personal backup system based on rsync. So far, it needs a small number of global parameters - like where things the scripts need are kept and a number of parameters which define a specific backup task like source, destination, whether the source should be unmounted before proceeding ... all parameter=value pairs, except a few which start out as small arrays.
Mar
17
comment Securely reading and parsing a string from a parameter or file in bash
I must be missing something. If I put my sample input into your code, it looks like it would be executed inside the $() before it even gets into var. Your idea of doing the parameter reading code before the sudo code would limit any damage to one user which is a lot better. I'll have to look at my scripts and see if that approach will fit.
Mar
17
comment Securely reading and parsing a string from a parameter or file in bash
@UlrichDangel Maybe you could point me to some example code. Read or cat into what? I can't put it in a variable, because the variable can't be accessed (or at least, I don't know how to) without subjecting its contents to expansion and, potentially, execution.
Mar
17
comment Securely reading and parsing a string from a parameter or file in bash
@vonbrand My first thought )reflected in my question) was that I might need to use a more conventional language such as python or C, but I was hoping for some ideas within the purview of bash. I downloaded that book and will read it later.
Mar
17
comment Securely reading and parsing a string from a parameter or file in bash
@UlrichDangel gconf is interesting. It's sort of what I was looking for, but way too powerful. It also looks like it may have too many things in it which, if broken, would take the rest of the system with them.
Mar
17
comment Securely reading and parsing a string from a parameter or file in bash
@UlrichDangel - aside from reading the file character by character as I suggested in my question, how do I parse something potentially dangerous in bash? I guess I'd have to pipe the file right into sed or awk or a similar program - other than bash. In bash, there doesn't seem to be a way to treat a string in a variable as just a string, not subject to further expansion.
Mar
15
asked Securely reading and parsing a string from a parameter or file in bash
Mar
9
answered Why is aliasing over standard commands not recommended?
Feb
14
comment Passing arguments to KOrganizer event reminder bash/yad scripts
I'm still working on it. I couldn't get it to work.
Feb
8
comment How to truely install a tar.gz file on Linux - how to manage manually-installed (or standalone) applications?
Continued ... checkinstall helps prevent that by keeping track of what was installed so it's easier to clean out later.
Feb
8
comment How to truely install a tar.gz file on Linux - how to manage manually-installed (or standalone) applications?
Continued ... Usually, when you install from a tarball, or other standalone package, your package management system doesn't know it's there which means you don't get "automatic" updates and can run into the dependency problems detailed in the answers. I haven't used checkinstall very much, but it seems really helpful. Sometimes, installing a tarball involves a lot of other packages getting installed (manually by you) to satisfy dependencies. The problem is that I don't keep good notes and when I want to get rid of the package, all the other stuff ends up as clutter on my system.
Feb
8
comment How to truely install a tar.gz file on Linux - how to manage manually-installed (or standalone) applications?
The biggest technical thing I don't like about Windows is the registry. It causes many more problems than it's worth and is why so many installs include a reboot. Thankfully, Linux has no such thing! What it does have is package management systems and repositories which make it easier to find and install software already configured for your distro and desktop environment. One of the major advantages of using these is that when a developer updates their software package, it automagically becomes available as an update for your system.
Feb
8
comment How to truely install a tar.gz file on Linux - how to manage manually-installed (or standalone) applications?
Great answer. One thing that is often necessary (or at least preferred) is to do a sudo make install as the last step (with a package you trust). That gives the process the permissions it needs to put things in system directories not owned by your user (like /usr/bin).
Feb
3
comment How to Find a Fugitive Crontab
+1 because it shows how to get the problem to explain itself!
Jan
29
comment Passing arguments to KOrganizer event reminder bash/yad scripts
I'll try that as soon as I can get back to it in a day or two. Since there's really nothing shell-like left to be done, Just leaving it in single quotes would probably be fine - unless my text has some embedded ones.
Jan
27
comment Passing arguments to KOrganizer event reminder bash/yad scripts
@DeerHunter Yes. Tried all that (some since posting the original question). The problem is getting the arguments to the script. That's why I just rewrote the question when I figured that much out. Thanks for trying the script!
Jan
27
revised Passing arguments to KOrganizer event reminder bash/yad scripts
Refined question based on further research
Jan
27
asked Passing arguments to KOrganizer event reminder bash/yad scripts
Jan
25
comment Disable screen blackout in KDE while watching iPlayer
There's a utility called caffeine that purports to turn off screensavers while video is playing. I installed it on kubuntu precise and it crashes. YMMV.
Jan
19
comment How to decide that mv moves into a directory rather than replacing directory?
I don't remember where I saw it, but when they designed Plan 9 (sort of a successor to UNIX) they split moving from renaming commands specifically to address situations like this.