Reputation
25,368
Next tag badge:
1051/400 score
79/80 answers
Badges
3 61 95
Newest
 Good Answer
Impact
~1.5m people reached

Aug
13
comment Sort input file by the results of a regex
Just a note b/c the OP will probably want to adapt this approach. By using \1 & in the replace expression of the sed substitute command, you can skip the decls temporary file and the paste invocation. Also, regex would need to be tuned to match only the identifier (the example given would misfire if a comment at the end of the line contained any identifiers with no numbers).
Aug
13
comment How do DE's call ACPI functions?
@darnir I'm not very familiar with the consolekit / policykit framework, but I am pretty sure there is a permissions system in place that has to do with active sessions / seats. Basically, anyone can use dbus-send to try to send messages, but only messages from the user session that is currently logged in and active will be accepted. Other users / sessions will get some sort of "authorization denied" reply if they try to do any of the above.
Aug
10
comment How to get VIM to display 256 colors properly
@Caleb Thanks, good to know. xterm works fine at the moment though, so I'll probably stay with it until it breaks.
Aug
10
comment How to get VIM to display 256 colors properly
@Caleb What problems do you mean? I actually switched from rxvt to xterm for better UTF-8 support and 256 colors works in both for me. I use TERM=screen-256color due to tmux though, but things also work with xterm-256color outside tmux.
Aug
8
revised bash myscript.sh runs in bash, but the first line is #!/usr/bin/sh
formatting
Aug
8
comment netcat in shell script giving invalid connection
That script is the listening side. Can you also post the client side?
Aug
7
comment AWK-Find maximum value in a row & print with header
This approach is probably more efficient than mine and works given the current assumptions. I'd just throw in some comments for posterity. I hadn't considered the string-building approach.
Aug
7
revised Get row data for non-matching column values
An expression this complicated is bound to have a typo somewhere. I have found one. Zarro boogs?
Aug
7
comment Methods of pasting X11 primary selection contents?
Do any of the answers to these questions work?
Aug
7
reviewed Approve Change view in emacs dired mode
Aug
5
revised Listing with `ls` and regular expression
Caret is not portable, `!` is.
Aug
3
comment Can I configure bash to execute “clear” before every command typed in the console?
I wish there were some way to do this without having to modify the command line itself - I'm sure this would break in interesting ways on complex or multi-line commands but I can't find any better way to do this.
Aug
3
comment Can I configure bash to execute “clear” before every command typed in the console?
A newline causes the prompt to be printed anyways, so putting the clear in the prompt accomplishes the same thing without polluting the command history with clear commands.
Aug
3
revised Can I configure bash to execute “clear” before every command typed in the console?
edited tags
Aug
3
revised AWK-Find maximum value in a row & print with header
edited tags
Aug
3
revised Undo `mv` command?
deleted 14 characters in body; edited title
Aug
3
comment Finding command execution time in hindsight
I include a timestamp in my shell prompt for this reason, but beware that the time shown in the prompt is when the prompt was printed, which may be quite different from the time you actually finished typing and hit enter to start the command. In other words, remember to factor in "prompt idle time" yourself.
Aug
3
comment Do I need ephemeral storage?
From the Amazon EC2 docs, it sounds like the instance storage drive mounted on /mnt is just some local scratch space that is not backed up or shared. You should be considering your own usage and asking yourself the question of whether you need it or not.
Aug
3
revised AWK-Find maximum value in a row & print with header
add comments
Aug
3
reviewed Approve Make thunar mount drives into /media rather than /run/media/username?