350 reputation
414
bio website
location
age
visits member for 3 years, 3 months
seen Jan 6 at 21:59

Dec
27
awarded  Popular Question
Dec
25
awarded  Tumbleweed
Dec
19
awarded  Notable Question
Dec
18
asked System fonts not taking effect in linux mint with both mate and cinnamon installed
Aug
16
comment Lock screen shortcut not working after update of Fedora 16
Yes, vintage F16 updates had not been applied, and I finally applied them. I fixed this by running gnome-screensaver &, since I guess this was removed from a list of startup apps. It's not ideal because I have to run that each time I restart or manually put it in my login file (seems like I should not have to do this).
Aug
13
awarded  Nice Question
Aug
12
asked Lock screen shortcut not working after update of Fedora 16
Aug
7
awarded  Popular Question
Apr
15
awarded  Popular Question
Mar
13
awarded  Notable Question
Dec
26
awarded  Notable Question
Sep
25
asked Trouble installing or booting into Ubuntu or Fedora using a live USB or DVD on a new Lenovo E31
Jul
31
awarded  Nice Question
May
23
awarded  Popular Question
Feb
16
awarded  Popular Question
Jan
4
awarded  Yearling
Apr
27
comment Best way to follow a log and execute a command when some text appears in the log
Thanks, -n 0 will help. In my current case, a little fragility isn't an issue because I'm just going through experimental iteration. From another question, I found that grep -m 1 "server is up" <(tail -n 0 -f /path/to/serverLog); some_command avoids problems with a pipe remaining alive when I expect it to die and have the command terminate.
Apr
26
comment Best way to follow a log and execute a command when some text appears in the log
I found an alternative, though I don't know how solid it is: tail -f /path/to/serverLog | grep "server is up" | head -1 && do_some_command
Apr
26
comment Best way to follow a log and execute a command when some text appears in the log
@penguin359, True, but it'd still be interesting to do it from the command line as well. In my case, there are a variety of different things I'd want to do including many things I can't foresee, so it's convenient to be able to just start the server and do it all in one line.
Apr
26
comment Best way to follow a log and execute a command when some text appears in the log
I like the awk solution for being short and easy to do on the fly in one line. However, if the command I want to run has quotes, this can be a bit cumbersome, is there an alternative, maybe using pipelines and compound commands that also allows a brief one-liner solution but doesn't require the resulting command to be passed as a string?