425 reputation
1714
bio website heeris.id.au
location
age
visits member for 3 years, 2 months
seen Dec 21 at 1:02

Dec
5
comment Why does combining `less` and `script` disrupt line endings?
Is there a way to replicate more "traditional" terminal/less interaction? I need to use script to get color output out of the executable I'm running, but the output is unreadable with the line endings the way they are.
Oct
12
comment Find recursively all archive files of diverse archive formats and search them for file name patterns
@Chemik - I just tried it, and it should support JAR files in its current form anyway. Can you test it out, and if it doesn't work as you expect, file a bug on the Github page? (I did just fix a bug, so be sure to update your copy.)
Oct
9
comment Find recursively all archive files of diverse archive formats and search them for file name patterns
@Chemik - noted! I'll do a bit more work on it this weekend :) JAR shouldn't be too hard, I believe it's really just a zip file to the outside world.
Apr
4
comment How can I activate the current session in ConsoleKit?
In fact, the easiest way to test this is to run ck-launch-session bash -c 'pkexec true'. If there's no output, it works. If you see (as I do) Error executing command as another user: Not authorized, it doesn't.
Apr
3
comment How can I activate the current session in ConsoleKit?
If I call ck-launch-session bash and run ck-list-sessions from within that terminal, the console still has active = FALSE for that session.
Mar
22
comment Is there a command to see where a disk is mounted?
"If the device was mounted via a different path in /dev that designates the same device, you won't notice it this way." — That is actually the case: I have the udisks symlink (in /dev/disk/by-label/...). But I can resolve to a device node using readlink -f. I like the /proc/mounts idea, I think that might be a bit more reliable than /etc/mtab.
Mar
22
comment Is there a command to see where a disk is mounted?
Although grep ^"${NODE}[[:space:]]\+" /etc/mtab | cut -d ' ' -f 2" is much less fragile...
Mar
22
comment Is there a command to see where a disk is mounted?
Ah, grep ${NODE} /etc/mtab | cut -d ' ' -f 2 should do it.
Mar
22
comment Is there a command to see where a disk is mounted?
That has a lot of extraneous text though. I need to be able to pass the mount point to other commands. (Sorry, I've clarified that in the Q.)
Feb
28
comment What characters do I need to escape when using sed in a sh script?
Are you subconsciously hitting your head against a wall? Here, have a green checkmark.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
Oh, this takes me back. I think this guide by Bruce Barnett has the RE used by sed. But what about the +? That's not in there, but echo 'AAA' | sed 's/A+/*/' won't work without escaping it.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
...and apparently + needs escaping too. That's... interesting.
Feb
28
comment What characters do I need to escape when using sed in a sh script?
facepalm It's not in the man page, but it IS in some online manual I found. Is this normal for regex, because I've never had to use it in regex libraries (in, eg. Python)?
Feb
28
comment What characters do I need to escape when using sed in a sh script?
I want sed to see s/(127\.0\.1\.1)/..., but putting that in a shell script as-is doesn't work. What you're saying about the shell not touching the parentheses seems wrong. I've edited my question to elaborate.
Feb
22
comment How do I configure syslinux to boot immediately
Maybe this syslinux bug is relevant.
Feb
22
comment How do I configure syslinux to boot immediately
noescape had no effect, so I set timeout to 1.
Nov
20
comment When is xargs needed?
Does xargs call the program via the shell with space separated args, or does it actually construct the argument list internally (eg. for use with execv/execp)?