diff --git a/.gitignore b/.gitignore
index 4f24c1c..b22ef91 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1 +1 @@
-SOURCES/grep-2.16.tar.xz
+SOURCES/grep-2.20.tar.xz
diff --git a/.grep.metadata b/.grep.metadata
index 069a1f0..c128006 100644
--- a/.grep.metadata
+++ b/.grep.metadata
@@ -1 +1 @@
-4ab9c1f8a5934734d3e01dc32ee1a8ae0f974359 SOURCES/grep-2.16.tar.xz
+55aac6158b51baa505669cf8f86440bcc106ec65 SOURCES/grep-2.20.tar.xz
diff --git a/SOURCES/colorgrep.csh b/SOURCES/colorgrep.csh
index 0b76c97..b3152a6 100644
--- a/SOURCES/colorgrep.csh
+++ b/SOURCES/colorgrep.csh
@@ -1,13 +1,9 @@
 
 # color-grep initialization
 
-if ( -r /etc/GREP_COLORS ) then
-    set color_none=`sed -n '/^COLOR.*none/Ip' < /etc/GREP_COLORS`
-    if ( "$color_none" != '' ) then
-        unset color_none
-        exit
-    endif
-    unset color_none
+/usr/libexec/grepconf.sh -c
+if ( $status == 1 ) then
+    exit
 endif
 
 alias grep 'grep --color=auto'
diff --git a/SOURCES/colorgrep.sh b/SOURCES/colorgrep.sh
index 9b23d61..cd0539c 100644
--- a/SOURCES/colorgrep.sh
+++ b/SOURCES/colorgrep.sh
@@ -1,11 +1,6 @@
 # color-grep initialization
 
-# Skip the rest for noninteractive shells.
-[ -z "$PS1" ] && return
-
-if [ -r /etc/GREP_COLORS ]; then
-    grep -qi "^COLOR.*none" /etc/GREP_COLORS >/dev/null 2>/dev/null && return
-fi
+/usr/libexec/grepconf.sh -c || return
 
 alias grep='grep --color=auto' 2>/dev/null
 alias egrep='egrep --color=auto' 2>/dev/null
diff --git a/SOURCES/grep-2.16-gnulib-tests-rm-f.patch b/SOURCES/grep-2.16-gnulib-tests-rm-f.patch
deleted file mode 100644
index 190a670..0000000
--- a/SOURCES/grep-2.16-gnulib-tests-rm-f.patch
+++ /dev/null
@@ -1,112 +0,0 @@
-diff -upr a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh
---- a/gnulib-tests/test-update-copyright.sh	2014-01-02 02:32:07.000000000 +0100
-+++ b/gnulib-tests/test-update-copyright.sh	2014-02-04 11:49:27.000000000 +0100
-@@ -228,7 +228,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme,
- # Software Foundation, Inc.
- EOF
- 
--rm $TMP*
-+rm -f $TMP*
- 
- ## -------------- ##
- ## Current year.  ##
-@@ -254,7 +254,7 @@ compare /dev/null $TMP-stderr || exit 1
- compare - $TMP <<EOF || exit 1
- '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## ------------------ ##
- ## Surrounding text.  ##
-@@ -278,7 +278,7 @@ dnl Undisturbed text.
- dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
- dnl   Undisturbed text.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## --------------- ##
- ## Widest prefix.  ##
-@@ -307,7 +307,7 @@ compare - $TMP <<EOF || exit 1
- #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
- #### Foundation, Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## ------------------- ##
- ## Prefix too large.  ##
-@@ -330,7 +330,7 @@ compare - $TMP <<EOF || exit 1
- ####  1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- ####  2008 Free Software Foundation, Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## ------------- ##
- ## Blank lines.  ##
-@@ -365,7 +365,7 @@ Copyright (C) 1976, 1977, 1978, 1979, 19
- 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
- 2008 Free Software Foundation, Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## -------------- ##
- ## Leading tabs.  ##
-@@ -394,7 +394,7 @@ compare - $TMP <<EOF || exit 1
- 	Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
- 	Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## -------------------- ##
- ## Unusual whitespace.  ##
-@@ -431,7 +431,7 @@ compare /dev/null $TMP-stderr || exit 1
- compare - $TMP <<EOF || exit 1
- 		# Copyright (C) 1987-2011 Free Software Foundation, Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## --------- ##
- ## DOS EOL.  ##
-@@ -453,7 +453,7 @@ Rem 1998, 1999, 2000, 2001, 2002, 2003,
- Rem 2009, 2010 Free Software Foundation, Inc.@
- EOF
- compare $TMP-exp $TMP || exit 1
--rm $TMP*
-+rm -f $TMP*
- 
- ## --------------- ##
- ## Omitted "(C)".  ##
-@@ -474,7 +474,7 @@ compare - $TMP <<EOF || exit 1
-   1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
-   Free Software Foundation, Inc.
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- ## ------------------ ##
- ## C-style comments.  ##
-@@ -542,6 +542,6 @@ EOF
- compare - $TMP.two-digit-final-is-substr-of-first <<EOF || exit 1
-  /* Copyright 1991, 1999, 2010 Free Software Foundation, Inc. */
- EOF
--rm $TMP*
-+rm -f $TMP*
- 
- exit 0
-diff -upr grep-2.16/gnulib-tests/test-version-etc.sh grep-2.16_fixed/gnulib-tests/test-version-etc.sh
---- a/gnulib-tests/test-version-etc.sh	2014-01-02 02:32:07.000000000 +0100
-+++ b/gnulib-tests/test-version-etc.sh	2014-02-04 11:50:00.000000000 +0100
-@@ -38,6 +38,6 @@ EOT
-  tr -d '\015' |
-  diff -c $TMP - || ERR=1
- 
--rm $TMP
-+rm -f $TMP
- 
- exit $ERR
diff --git a/SOURCES/grep-2.16-help-align.patch b/SOURCES/grep-2.16-help-align.patch
deleted file mode 100644
index d94d46b..0000000
--- a/SOURCES/grep-2.16-help-align.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-diff --git a/src/main.c b/src/main.c
-index 7c1bd60..6b7a932 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -1598,16 +1598,19 @@ Output control:\n\
-   -D, --devices=ACTION      how to handle devices, FIFOs and sockets;\n\
-                             ACTION is 'read' or 'skip'\n\
-   -r, --recursive           like --directories=recurse\n\
--  -R, --dereference-recursive  likewise, but follow all symlinks\n\
-+  -R, --dereference-recursive\n\
-+                            likewise, but follow all symlinks\n\
- "));
-       printf (_("\
--      --include=FILE_PATTERN  search only files that match FILE_PATTERN\n\
--      --exclude=FILE_PATTERN  skip files and directories matching FILE_PATTERN\n\
-+      --include=FILE_PATTERN\n\
-+                            search only files that match FILE_PATTERN\n\
-+      --exclude=FILE_PATTERN\n\
-+                            skip files and directories matching FILE_PATTERN\n\
-       --exclude-from=FILE   skip files matching any file pattern from FILE\n\
--      --exclude-dir=PATTERN  directories that match PATTERN will be skipped.\n\
-+      --exclude-dir=PATTERN directories that match PATTERN will be skipped.\n\
- "));
-       printf (_("\
--  -L, --files-without-match  print only names of FILEs containing no match\n\
-+  -L, --files-without-match print only names of FILEs containing no match\n\
-   -l, --files-with-matches  print only names of FILEs containing matches\n\
-   -c, --count               print only a count of matching lines per FILE\n\
-   -T, --initial-tab         make tabs line up (if needed)\n\
diff --git a/SOURCES/grep-2.16-man-fix-gs.patch b/SOURCES/grep-2.16-man-fix-gs.patch
deleted file mode 100644
index 2352919..0000000
--- a/SOURCES/grep-2.16-man-fix-gs.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-diff --git a/doc/grep.in.1 b/doc/grep.in.1
-index d91de8c..9e8d8d2 100644
---- a/doc/grep.in.1
-+++ b/doc/grep.in.1
-@@ -377,7 +377,7 @@ Print
- .I NUM
- lines of trailing context after matching lines.
- Places a line containing a group separator
--.RB ( \-\^\- )
-+.RB "(described under " \-\^\-group\-separator )
- between contiguous groups of matches.
- With the
- .B \-o
-@@ -390,7 +390,7 @@ Print
- .I NUM
- lines of leading context before matching lines.
- Places a line containing a group separator
--.RB ( \-\^\- )
-+.RB "(described under " \-\^\-group\-separator )
- between contiguous groups of matches.
- With the
- .B \-o
-@@ -403,13 +403,24 @@ Print
- .I NUM
- lines of output context.
- Places a line containing a group separator
--.RB ( \-\^\- )
-+.RB "(described under " \-\^\-group\-separator )
- between contiguous groups of matches.
- With the
- .B \-o
- or
- .B \-\^\-only\-matching
- option, this has no effect and a warning is given.
-+.TP
-+.BI \-\^\-group\-separator= SEP
-+Use
-+.I SEP
-+as a group separator. By default
-+.I SEP
-+is double hyphen
-+.RB ( \-\^\- ).
-+.TP
-+.B \-\^\-no\-group-separator
-+Use empty string as a group separator.
- .SS "File and Directory Selection"
- .TP
- .BR \-a ", " \-\^\-text
-diff --git a/src/main.c b/src/main.c
-index 44090be..7c1bd60 100644
---- a/src/main.c
-+++ b/src/main.c
-@@ -1621,6 +1621,8 @@ Context control:\n\
- "));
-       printf (_("\
-   -NUM                      same as --context=NUM\n\
-+      --group-separator=SEP use SEP as a group separator\n\
-+      --no-group-separator  use empty string as a group separator\n\
-       --color[=WHEN],\n\
-       --colour[=WHEN]       use markers to highlight the matching strings;\n\
-                             WHEN is 'always', 'never', or 'auto'\n\
diff --git a/SOURCES/grep-2.20-help-align.patch b/SOURCES/grep-2.20-help-align.patch
new file mode 100644
index 0000000..cef6311
--- /dev/null
+++ b/SOURCES/grep-2.20-help-align.patch
@@ -0,0 +1,29 @@
+diff --git a/src/grep.c b/src/grep.c
+index 0fcc272..2208a4e 100644
+--- a/src/grep.c
++++ b/src/grep.c
+@@ -1579,16 +1579,19 @@ Output control:\n\
+   -D, --devices=ACTION      how to handle devices, FIFOs and sockets;\n\
+                             ACTION is 'read' or 'skip'\n\
+   -r, --recursive           like --directories=recurse\n\
+-  -R, --dereference-recursive  likewise, but follow all symlinks\n\
++  -R, --dereference-recursive\n\
++                            likewise, but follow all symlinks\n\
+ "));
+       printf (_("\
+-      --include=FILE_PATTERN  search only files that match FILE_PATTERN\n\
+-      --exclude=FILE_PATTERN  skip files and directories matching FILE_PATTERN\n\
++      --include=FILE_PATTERN\n\
++                            search only files that match FILE_PATTERN\n\
++      --exclude=FILE_PATTERN\n\
++                            skip files and directories matching FILE_PATTERN\n\
+       --exclude-from=FILE   skip files matching any file pattern from FILE\n\
+-      --exclude-dir=PATTERN  directories that match PATTERN will be skipped.\n\
++      --exclude-dir=PATTERN directories that match PATTERN will be skipped.\n\
+ "));
+       printf (_("\
+-  -L, --files-without-match  print only names of FILEs containing no match\n\
++  -L, --files-without-match print only names of FILEs containing no match\n\
+   -l, --files-with-matches  print only names of FILEs containing matches\n\
+   -c, --count               print only a count of matching lines per FILE\n\
+   -T, --initial-tab         make tabs line up (if needed)\n\
diff --git a/SOURCES/grep-2.20-man-fix-gs.patch b/SOURCES/grep-2.20-man-fix-gs.patch
new file mode 100644
index 0000000..db3dd24
--- /dev/null
+++ b/SOURCES/grep-2.20-man-fix-gs.patch
@@ -0,0 +1,61 @@
+diff --git a/doc/grep.in.1 b/doc/grep.in.1
+index 58a6c0e..3e6a8cf 100644
+--- a/doc/grep.in.1
++++ b/doc/grep.in.1
+@@ -377,7 +377,7 @@ Print
+ .I NUM
+ lines of trailing context after matching lines.
+ Places a line containing a group separator
+-.RB ( \-\^\- )
++.RB "(described under " \-\^\-group\-separator )
+ between contiguous groups of matches.
+ With the
+ .B \-o
+@@ -390,7 +390,7 @@ Print
+ .I NUM
+ lines of leading context before matching lines.
+ Places a line containing a group separator
+-.RB ( \-\^\- )
++.RB "(described under " \-\^\-group\-separator )
+ between contiguous groups of matches.
+ With the
+ .B \-o
+@@ -403,13 +403,24 @@ Print
+ .I NUM
+ lines of output context.
+ Places a line containing a group separator
+-.RB ( \-\^\- )
++.RB "(described under " \-\^\-group\-separator )
+ between contiguous groups of matches.
+ With the
+ .B \-o
+ or
+ .B \-\^\-only\-matching
+ option, this has no effect and a warning is given.
++.TP
++.BI \-\^\-group\-separator= SEP
++Use
++.I SEP
++as a group separator. By default
++.I SEP
++is double hyphen
++.RB ( \-\^\- ).
++.TP
++.B \-\^\-no\-group-separator
++Use empty string as a group separator.
+ .SS "File and Directory Selection"
+ .TP
+ .BR \-a ", " \-\^\-text
+diff --git a/src/grep.c b/src/grep.c
+index 7c0f8a8..0fcc272 100644
+--- a/src/grep.c
++++ b/src/grep.c
+@@ -1602,6 +1602,8 @@ Context control:\n\
+ "));
+       printf (_("\
+   -NUM                      same as --context=NUM\n\
++      --group-separator=SEP use SEP as a group separator\n\
++      --no-group-separator  use empty string as a group separator\n\
+       --color[=WHEN],\n\
+       --colour[=WHEN]       use markers to highlight the matching strings;\n\
+                             WHEN is 'always', 'never', or 'auto'\n\
diff --git a/SOURCES/grepconf.sh b/SOURCES/grepconf.sh
new file mode 100644
index 0000000..418af0b
--- /dev/null
+++ b/SOURCES/grepconf.sh
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+case "$1" in
+    -c | --interactive-color)
+        ! grep -qsi "^COLOR.*none" /etc/GREP_COLORS
+        ;;
+    *)
+        echo >&2 "Invalid / no option passed, so far only -c | --interactive-color is supported."
+        exit 1
+        ;;
+esac
diff --git a/SPECS/grep.spec b/SPECS/grep.spec
index b3c7b8d..1a9490f 100644
--- a/SPECS/grep.spec
+++ b/SPECS/grep.spec
@@ -2,7 +2,7 @@
 
 Summary: Pattern matching utilities
 Name: grep
-Version: 2.16
+Version: 2.20
 Release: 1%{?dist}
 License: GPLv3+
 Group: Applications/Text
@@ -10,11 +10,11 @@ Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz
 Source1: colorgrep.sh
 Source2: colorgrep.csh
 Source3: GREP_COLORS
-Patch1: grep-2.16-gnulib-tests-rm-f.patch
+Source4: grepconf.sh
 # upstream ticket 39444
-Patch2: grep-2.16-man-fix-gs.patch
+Patch0: grep-2.20-man-fix-gs.patch
 # upstream ticket 39445
-Patch3: grep-2.16-help-align.patch
+Patch1: grep-2.20-help-align.patch
 URL: http://www.gnu.org/software/grep/
 Requires(post): /sbin/install-info
 Requires(preun): /sbin/install-info
@@ -33,9 +33,8 @@ GNU grep is needed by many scripts, so it shall be installed on every system.
 
 %prep
 %setup -q
-%patch1 -p1 -b .gnulib-tests-rm-f
-%patch2 -p1 -b .man-fix-gs
-%patch3 -p1 -b .help-align
+%patch0 -p1 -b .man-fix-gs
+%patch1 -p1 -b .help-align
 
 %build
 %global BUILD_FLAGS $RPM_OPT_FLAGS
@@ -59,6 +58,7 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir
 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
 install -pm 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
 install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
+install -Dpm 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/grepconf.sh
 
 %find_lang %name
 
@@ -85,9 +85,14 @@ fi
 %config(noreplace) %{_sysconfdir}/GREP_COLORS
 %{_infodir}/*.info*.gz
 %{_mandir}/*/*
+%{_libexecdir}/grepconf.sh
 
 %changelog
-* Tue Feb 04 2014 Jan Grulich <jgrulich@redhat.com< - 2.16-1
+* Fri Sep  5 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 2.20-1
+- New version
+  Resolves: rhbz#1123005
+
+* Tue Feb 04 2014 Jan Grulich <jgrulich@redhat.com> - 2.16-1
 - Update to 2.16
 - Resolves: rhbz#1050916
 - Resolves: rhbz#1050919