« first day (1302 days earlier)      last day (3659 days later) » 

10:09 PM
hey guys, I'm relatively new to bash and trying to understand why awk is doing this.

awk '/^config\ hostname:.*/ {f=1;print $3}' barnyard2.conf
prints my-units-hostname

yet when I run this:
HOSTNAME=2-bot.kernelops.org; awk -v hostname=$HOSTNAME '/config\ hostname:.*/ {f=1 && $2=="hostname:"} f {$3="\t"hostname} {print}' barnyard2.conf > newbarnyard

every single line in the file has the $HOSTNAME variable printed in column 3...
it should only be replacing the hostname on the line that starts with config hostname:
well, this is embarrassing but I figured it out: I had the ` && $2=="hostname:" in the wrong spot
 
at least your snort suite configs will start working now.
@sadmicrowave wouldn't sed have been easier for that one anyway? sometimes, awk is a little bit of overkill...
 
10:37 PM
@WilliamLawnStewart - how are things in that part of the world? It's on my list of places to see before I die.
o/ @psusi - anything new/interesting?
jeez... everyone is showing up. what happened?
 
unicorns....
btw, if I see a unicorn tag, I will delete my account....
 
@Braiam yes, fixed
 
10:53 PM
did I made a harakiri?
 
it seems possible, but i doubt you did it without cause.
 
11:16 PM
0
Q: How can I participate?

BruceI want to participate here at AskUbuntu and am compelled to contribute based on information that is not being found in many of the discussions but because of the absolute strict and high bar set by the moderators, I am unable to make those contributions and provide ample and necessary help that i...

1
Q: Unicorn tag - potential conflict

Thomas W.The unicorn tag could mean one of two things: the U-series codename for 14.10, or the prefork server that can be used in conjunction with other webservers. It looks like there's edits in the tag wikis for Unicorn to be the latter of those two, but unicorn is marked now as a synonym of 14.10 as d...

 
11:29 PM
0
Q: Don't suggest version specific tag when writing questions

BraiamAs Gilles has said in his other answer "version tags are massively overused on AU", I think is our fault that such things happens. We allow them be alone we them shouldn't and we do nothing to fix that. So, when an user ask a new question and gets offered XX.XX as only tag, is obvious that the us...

 
@hbdgaf - A bit cold, but that may be because I'm in my pajamas at 11:30am
 

« first day (1302 days earlier)      last day (3659 days later) »