Reputation
235
Top tag
Next privilege 250 Rep.
View close votes
Badges
3 9
Newest
 Necromancer
Impact
~50k people reached

Apr
24
awarded  Necromancer
Apr
9
awarded  Yearling
Dec
10
answered PDF - removing usage restrictions
Sep
24
awarded  Autobiographer
Oct
7
awarded  Necromancer
May
24
comment Monitor /sys partition for changes
Mikel, I use inotifywait from inotify-tools. Can you try this in a laptop? inotifywait -m /sys/class/power_supply/BAT0/status. I get I don't get any event when this value changes (unplug/plug the battery).
May
23
comment Monitor /sys partition for changes
I think we can safely assume the OP was working from a shell and he wasn't talking about C functions. Anyway, currently it's still not working for me in /sys files (Linux 3.6.3), I only get OPEN/ACCESS events, but not changes made by the kernel.
Jan
12
awarded  Excavator
Jan
12
revised disable cd/dvd button on linux laptop (ubuntu)
fixed code blocks and sudo command
Jan
12
suggested approved edit on disable cd/dvd button on linux laptop (ubuntu)
Jan
12
awarded  Commentator
Jan
12
comment disable cd/dvd button on linux laptop (ubuntu)
Note that sudo command > file won't work, you need something like echo 1 | sudo tee /proc/sys/dev/cdrom/lock.
May
27
awarded  Critic
May
26
revised Test if element is in array in bash
deleted 127 characters in body
May
26
awarded  Teacher
May
25
comment Test if element is in array in bash
note that if ! some_check then return 1 = some_check. So: isNotSet() { [[ ... ]] }. Check my solution below, you can do it in a simple check.
May
25
comment Test if element is in array in bash
Some posts about set -u: davidpashley.com/articles/writing-robust-shell-scripts.html, blog.hashbang0.com/2010/05/18/robust-bash-scripts-part-one, openews.net/2012/bash-script-to-write-robust.
May
25
revised Test if element is in array in bash
added 8 characters in body
May
25
comment Test if element is in array in bash
@DennisWilliamson: Ok, some people recommend it, but I think it would be nice to have a solution that works regardless the value of these flags.
May
25
answered Test if element is in array in bash