title: awk: Split on "\n"
body: <p>I'm trying to process a log file in which entries are compressed into one line with the newline encoded as "\n". I want to keep everything up to the first "\n" and discard the rest. <code>awk -F"\n" '{print $1}' file</code> doesn't work, and neither does <code>awk -F"\\n" '{print $1}' file</code>. What's the correct form of this command?</p>