You're viewing a comment by efix and its responses.

efix Permalink
September 16, 2010, 12:32

"# iptables -L TRAFFIC_ACCT_OUT -n -v -x | awk '$1 ~ /^[0-9]+$/ { printf "IP: %s, %d bytes\n", $7, $2 }'"
this command works in console perfectly, but output file is all in one line (not column). Anyone help me make column like in console?

Comment Responses

jee Permalink
June 12, 2011, 09:30

output file is in tabular (column) mode too. The printf command uses '\n' to add new lines.

Maybe you are trying to open this file on a windows machine? If so, use command "unix2dos" or sed equivalent.

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type the word "sandbox": (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.