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: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#24025: closed (grep usage question)
Date: Sat, 24 Sep 2016 21:39:02 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 24 Sep 2016 14:38:04 -0700
with message-id <ee876dde-a55c-e567-180c-4ef406dcd6d6 <at> cs.ucla.edu>
and subject line Re: grep usage question
has caused the debbugs.gnu.org bug report #24025,
regarding grep usage question
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> 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: Leroy Harrill <cdideveloper016 <at> gmail.com>
To: bug-grep <at> gnu.org
Date: Tue, 19 Jul 2016 08:11:09 -0400
[Message part 3 (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 4 (text/html, inline)]
[Message part 5 (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.


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.