GNU bug report logs - #24025
grep usage question

Previous Next

Package: grep;

Reported by: Leroy Harrill <cdideveloper016 <at> gmail.com>

Date: Tue, 19 Jul 2016 15:38:01 UTC

Severity: normal

Tags: moreinfo

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Leroy Harrill <cdideveloper016 <at> gmail.com>
Subject: bug#24025: closed (Re: grep usage question)
Date: Sat, 24 Sep 2016 21:39:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#24025: grep usage question

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 24025 <at> debbugs.gnu.org.

-- 
24025: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=24025
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Leroy Harrill <cdideveloper016 <at> gmail.com>
Cc: 24025-done <at> debbugs.gnu.org
Subject: Re: grep usage question
Date: Sat, 24 Sep 2016 14:38:04 -0700
No further comment and it has been a couple of months, so closing the bug report.

[Message part 3 (message/rfc822, inline)]
From: Leroy Harrill <cdideveloper016 <at> gmail.com>
To: bug-grep <at> gnu.org
Date: Tue, 19 Jul 2016 08:11:09 -0400
[Message part 4 (text/plain, inline)]
I am not sure if this is a bug or not. Her is an example of my script that
I am running.

#!/bin/bash

rm -f x.txt
rm -f new_file

i=1
wc -l file1 | sed 's/file1//g' >> x.txt

x=$(<x.txt)

while [ $i -le $x ]
do
            #echo "$i"
         A=$( awk -v var="$i" 'NR==var {print}' file1)
        #ack -k file1 file2 --match $A >> new_file
        grep $A some_file.txt
    ((i++))

done

grep does not appear to be grepping inside of the while loop. When I
initialize a variable directly from the command line and write the same
script it works no problem, any help on this matter would be greatly
appreciated.
[Message part 5 (text/html, inline)]

This bug report was last modified 8 years and 300 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.