Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 55651 - net-firewall/fwanalog uses tail -1 instead of tail -n 1
Summary: net-firewall/fwanalog uses tail -1 instead of tail -n 1
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Daniel Black (RETIRED)
Depends on:
Reported: 2004-06-30 03:36 UTC by Ioannis Aslanidis (RETIRED)
Modified: 2004-07-19 20:52 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Ioannis Aslanidis (RETIRED) gentoo-dev 2004-06-30 03:36:05 UTC
/etc/fwanalog/ uses "tail -1", but it has been deprecated, so it should be "tail -n 1".


        # Find the new lines since the last invocation
        if [ -s $outdir/fwanalog.all.log ]; then
        # there is already an old log - find its last line and use it
        # to determine the new contents of the grepped/converted file
                $grep . $outdir/fwanalog.all.log \
                        | tail -1 \
                        | $sed 's/[^a-zA-Z0-9 _-]/./g' \
                        | $sed 's#^\(.*\)$#1,/^\1$/d#' \
                        > $outdir/match_last_line.sed
                        # match_last_line.sed now contains the last line in reg$
                        # it can be searched in the new file. Most non-alphanum$
                        # have been replaced with . so they don't act as metach$

                $grep . $outdir/fwanalog.all.log \
                        | tail -1 \
                        | $sed 's/[^a-zA-Z0-9 _-]/./g' \
                        > $outdir/match_last_line.pattern
                        # create the regexp for grep


Reproducible: Always
Steps to Reproduce:
1. /etc/fwanalog/
Comment 1 Daniel Black (RETIRED) gentoo-dev 2004-07-10 15:34:24 UTC
will fix by end of week - overseas at the moment
Comment 2 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-10 15:36:48 UTC
OK, we have time before the option gets removed :)
Comment 3 Daniel Black (RETIRED) gentoo-dev 2004-07-15 14:04:38 UTC
Looks fixed in the cvs version so I'm just going to wait till a version bump. ok? Well done for being a keen eye.
Comment 4 Ioannis Aslanidis (RETIRED) gentoo-dev 2004-07-15 14:20:53 UTC
Thank you. We can close we there's a version bump.
Comment 5 Daniel Black (RETIRED) gentoo-dev 2004-07-19 20:52:11 UTC
closed as requested