Christoffer Hammarström

less info
290 reputation
16
bio website
location
age
visits member for 3 years, 9 months
seen Jul 19 at 12:37
My expert areas are Java, Perl, Shell, Unix, and character encodings.

Nov
11
awarded  Commentator
Nov
11
comment How Wine is not an emulator?
Normally when computer minded people use the word "emulator", they mean a hardware emulator, software that emulates hardware. In that sense Wine is not an emulator. However in the dictionary sense of the word, Wine does emulate Windows, and in that sense you could call Wine a Windows emulator.
May
5
comment Wireless mouse freezes frequently for a second on laptop, when on battery
To do this permanently, edit /etc/laptop-mode/conf.d/usb-autosuspend.conf and add the id for your mouse device (which you find with lsusb) to AUTOSUSPEND_USBID_BLACKLIST. It should be enough to then restart laptop-mode, but it didn't work for me until i rebooted, for some reason.
Mar
25
comment Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
@terdon: If you don't want to use say, you can at least use -l to skip \n.
Mar
25
comment Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
@terdon: for is shorter than map { }, also, i think it looks nicer and reads better.
Mar
25
comment Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
map builds and returns a list of values. Here it is being used as a for or foreach.
Mar
25
revised Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
deleted 3 characters in body
Mar
25
comment Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
Also, with -l you don't need "\n". But might be even better to use -E and say.
Mar
25
comment Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
I recommend print "$1.$_\n" for ..." instead of map { print "$1.$_\n" } ....
Mar
25
answered Slick one-liner to convert a list like “1: 2, 3, 4, 5” to “1.2, 1.3, 1.4, 1.5”
Aug
28
awarded  Nice Answer
May
26
awarded  Yearling
May
25
comment How can I remove all symbolic links with a special target?
@JamesYoungman: Thanks! By modern find i really meant GNU find. ;) I used usr/local/bin, because that's what the OP used.
May
25
revised How can I remove all symbolic links with a special target?
added 1 characters in body
May
25
answered How can I remove all symbolic links with a special target?
Jan
30
awarded  Critic
Jan
13
awarded  Supporter
Jan
13
comment How can I delete a file with no name
@KeithThompson: Glob expansion in the shell isn't subject to further interpretation. There wouldn't be a newline in the expanded name unless it contained one.
Nov
21
comment How do I close a terminal without saving the history?
I don't think it's a good idea to promote using kill -9 for anything except dire situations when everything else has failed.
Oct
5
awarded  Teacher