--On Friday, August 20, 2010 17:24:55 -0700 Randal L. Schwartz
mer...@stonehenge.com wrote:
Paul == Paul Schmehl pschmehl_li...@tx.rr.com writes:
Paul Yes, I know I could do this easily in Perl. I'm doing this to try
Paul and improve my understanding of awk.
To what end?
Every modern
On Fri, 2010-08-20 at 12:12 -0500, Paul Schmehl wrote:
I'm trying to figure out how to use awk to parse values from a string of
unknown length and unknown fields using awk, from within a shell script, and
write those values to a file in a certain order.
Here's a typical string that I want
I'm trying to figure out how to use awk to parse values from a string of
unknown length and unknown fields using awk, from within a shell script, and
write those values to a file in a certain order.
Here's a typical string that I want to parse:
alert ip
On Fri, Aug 20, 2010 at 12:12:20PM -0500, Paul Schmehl wrote:
But when I add an FS to the script, I get odd results:
# awk '!/#/ { FS=;; for (i=1; i=NF; i++) { if ( $i ~ /sid/)
{mtcmsg[sid]=$i; print mtcmsg[sid]}}}'
/usr/local/etc/snort/rules/mtc.rules.test
sid:299913;
sid:52123
On 20 August 2010 18:12, Paul Schmehl pschmehl_li...@tx.rr.com wrote:
I'm trying to figure out how to use awk to parse values from a string of
unknown length and unknown fields using awk, from within a shell script, and
write those values to a file in a certain order.
Here's a typical string
On Fri, Aug 20, 2010 at 12:42 PM, Paul Schmehl pschmehl_li...@tx.rr.com wrote:
I'm trying to figure out how to use awk to parse values from a string of
unknown length and unknown fields using awk, from within a shell script, and
write those values to a file in a certain order.
Here's a
Paul == Paul Schmehl pschmehl_li...@tx.rr.com writes:
Paul Yes, I know I could do this easily in Perl. I'm doing this to try
Paul and improve my understanding of awk.
To what end?
Every modern system that can run awk can also run Perl. Why not
concentrate on Perl?
--
Randal L. Schwartz -
On 08/20/2010 07:24 PM, Randal L. Schwartz wrote:
Every modern system that can run awk can also run Perl. Why not
concentrate on Perl?
Unless perl is not installed, and you want to use only base system
components. I frequently do this on my minimalist flashcard installations.
--
Fuzzy love,
On Fri, Aug 20, 2010 at 05:24:55PM -0700, Randal L. Schwartz wrote:
Paul == Paul Schmehl pschmehl_li...@tx.rr.com writes:
Paul Yes, I know I could do this easily in Perl. I'm doing this to try
Paul and improve my understanding of awk.
To what end?
Every modern system that can run awk