Re: [dev][dmenu] filter files with grep but print corresponding urls?

From: Rob <robpilling_AT_gmail.com>
Date: Sun, 9 May 2010 00:45:14 +0100

Something a bit like this?

#!/bin/sh
find=$(dmenu < /dev/null)
for f in *
do
  if grep -qi $find $f
  then echo $f
  fi
done | dmenu

I don't know how/what the format is internally for each file, but it won't be
difficult to filter the site name + url from the file using an awk and/or sed
tag team inside the if block.

On 8 May 2010 20:50, Andreas Wagner <andreasbwagner_AT_gmail.com> wrote:
> Hello,
>
> I am writing some shell scripts for an uzbl bookmarker with full text
> search of webpages bookmarked. It wgets the html and takes the md5sum
> (of the page), the url and the title and puts them, space separated in
> a file. The downloaded page's filename is changed to the md5sum.
>
> I was trying a way to do the full text search of the pages with an
> arbitrary tool such as grep but display the corresponding titles+urls
> of the pages in the dmenu.
>
> Is this currently possible with dmenu?
>
> Thanks,
> Andreas
Received on Sat May 08 2010 - 23:45:14 UTC

This archive was generated by hypermail 2.2.0 : Sat May 08 2010 - 23:48:02 UTC