title: How to print file details of files matching grep pattern
body: <p>I want to print file details along with grep output but unable to do so.  E.g., for the command</p>
  
  <pre><code>grep 3456 A.txt
  </code></pre>
  
  <p>I get the output </p>
  
  <pre><code>A.txt
  </code></pre>
  
  <p>but would like the output</p>
  
  <pre><code>-rw-rw-r-- 1 tarun tarun   41356911 Aug 25 01:31 A.txt
  </code></pre>
  
  <p>I tried the following without success:</p>
  
  <ol>
  <li><p><code>grep 34567 A.txt | xargs ls -tlr</code></p></li>
  <li><p><code>grep 34567 A.txt | while read line ; do echo "$line" | date %s.%N ; done</code></p></li>
  <li><p><code>grep -Hr 34567 A.txt | awk -F: '{"stat -c %z "$1 | getline r; print r": "$0 }'</code></p></li>
  <li><p><code>grep 34567 A.txt | awk -F: '{"date -r \""$1"\" +\"%F %R\"" | getline d; print d,$0}'</code></p></li>
  </ol>