aboutsummaryrefslogtreecommitdiffstats
path: root/doc/gawk.texi
diff options
context:
space:
mode:
Diffstat (limited to 'doc/gawk.texi')
-rw-r--r--doc/gawk.texi22
1 files changed, 20 insertions, 2 deletions
diff --git a/doc/gawk.texi b/doc/gawk.texi
index 24879b78..a9ae048a 100644
--- a/doc/gawk.texi
+++ b/doc/gawk.texi
@@ -26,7 +26,7 @@
@c applies to and all the info about who's publishing this edition
@c These apply across the board.
-@set UPDATE-MONTH December, 2013
+@set UPDATE-MONTH January, 2014
@set VERSION 4.1
@set PATCHLEVEL 0
@@ -153,7 +153,8 @@ Some comments on the layout for TeX.
@copying
Copyright @copyright{} 1989, 1991, 1992, 1993, 1996, 1997, 1998, 1999,
-2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012, 2013
+2000, 2001, 2002, 2003, 2004, 2005, 2007, 2009, 2010, 2011, 2012, 2013,
+2014
Free Software Foundation, Inc.
@sp 2
@@ -401,6 +402,7 @@ particular records in a file and perform operations upon them.
field.
* Command Line Field Separator:: Setting @code{FS} from the
command-line.
+* Full Line Fields:: Making the full line be a single field.
* Field Splitting Summary:: Some final points and a summary table.
* Constant Size:: Reading constant width data.
* Splitting By Content:: Defining Fields By Content
@@ -6306,6 +6308,7 @@ with a statement such as @samp{$1 = $1}, as described earlier.
* Regexp Field Splitting:: Using regexps as the field separator.
* Single Character Fields:: Making each character a separate field.
* Command Line Field Separator:: Setting @code{FS} from the command-line.
+* Full Line Fields:: Making the full line be a single field.
* Field Splitting Summary:: Some final points and a summary table.
@end menu
@@ -6674,6 +6677,21 @@ the entries for users who have no password:
awk -F: '$2 == ""' /etc/passwd
@end example
+@node Full Line Fields
+@subsection Making The Full Line Be A Single Field
+
+Occasionally, it's useful to treat the whole input line as a
+single field. This can be done easily and portably simply by
+setting @code{FS} to @code{"\n"} (a newline).@footnote{Thanks to
+Andrew Schorr for this tip.}
+
+@example
+awk -F'\n' '@var{program}' @var{files @dots{}}
+@end example
+
+@noindent
+When you do this, @code{$1} is the same as @code{$0}.
+
@node Field Splitting Summary
@subsection Field-Splitting Summary