Reputation
672
Top tag
Next privilege 1,000 Rep.
See vote count; VIP usercard
Badges
1 4 20
Impact
~105k people reached

  • 0 posts edited
  • 0 helpful flags
  • 38 votes cast
Jun
18
asked shorten long lines in a log file
May
10
comment fetchmail to log complete messages AND pass to mda
I considered that too, making a simple wrapper that logs before handing off/exec to the real MDA. The trouble is that mucks with the stdout of fetchmail, which sometimes I count on leaving unread partially or at all (the fetchmail side of the pipe sees where the seek pointer left off...)
May
9
comment Get “date” to understand a timestamp phrase of a different language
Reminder: I don't get to control the input format. But I may prepend or append eg. the current year before sending off the whole string to a universal, magic parser.
May
9
revised fetchmail to log complete messages AND pass to mda
explained better detail
May
9
comment fetchmail to log complete messages AND pass to mda
An alternative to fetchmail as a layer would be fine too
May
9
comment change environment of a running process
xpra sounds useful. Normally I reroute to non-user displays hosted by Xvfb or Xephyr, but today I forgot and ran from cli rather than cron/at to troubleshoot output, so it's been annoying me at :0
May
9
accepted change environment of a running process
May
9
comment change environment of a running process
Yes I realize it's somewhat of a hack, risky and not guaranteed for reasons you mentioned. (Part of the reason I visit this group is for such non-conventional needs I can't seem to find ordinarily.) In this case setting DISPLAY to junk or empty merely resolves an annoyance and delay(unnecessary frequent screenshots over network,fine if they fail). Since child copies parent, I need only mod the parent env. Many new child &subchild processes are getting spawned and exit quickly in my batch job; those matter. I figured a debugger could do this, thanks--I could wrap that into a shell function.
May
9
asked change environment of a running process
May
9
asked fetchmail to log complete messages AND pass to mda
May
1
comment Get “date” to understand a timestamp phrase of a different language
Very good demonstration of bash techniques. Besides that I mostly use Ruby for programs if not awk for one-liners, both have strptime or similar--where you still have to specify the field format manually.
May
1
accepted Get “date” to understand a timestamp phrase of a different language
May
1
asked Get “date” to understand a timestamp phrase of a different language
Apr
20
awarded  Quorum
Mar
24
comment sort at jobs chronologically
Actually, a shorter version may be doable with bash readline instead of awk
Mar
24
answered sort at jobs chronologically
Mar
23
accepted sort at jobs chronologically
Mar
23
comment sort at jobs chronologically
I'm okay with reformatting the 2nd field as 2012-03-23_13-11-01 which is sorting-friendly, which I think date can do. With the --date=STRING param and +\%Y-\%m-\%d_\%H-\%M-\%S
Mar
23
comment sort at jobs chronologically
On one host with 200+ jobs the output seems to be sorted by id mainly--not always timestamp in the 2nd half. Anyway, the date command has special timestamp-parsing powers that could make this simpler when fed the right fields eg. with cut.
Mar
23
asked sort at jobs chronologically