Groups | Search | Server Info | Login | Register


Groups > alt.comp.lang.shell.unix.bourne-bash > #241

Spotlight replacement

From cele_82 <cele_82@RMVlibero.it>
Newsgroups alt.comp.lang.shell.unix.bourne-bash
Subject Spotlight replacement
Date 2018-12-04 16:18 +0000
Organization Aioe.org NNTP Server
Message-ID <pu69cb$3b4$1@gioia.aioe.org> (permalink)

Show all headers | View raw


Hi,
I'm looking for a one liner to add to my .bashrc as function so I can 
search for multiple words on a filename list.(my notes)


An alias like this works already on a single string.

alias notes='ls -l ~/Notes/ | grep -i $1


I would like to find a way to make the line above work with multiple 
search terms in an AND logic operation...

using $@ instead of $i won't work.

I've tried

ls -l ~/Notes/ | for i in "$@"; do grep $i; done;

but only the first search term gets filtered..




Ideas ?

Back to alt.comp.lang.shell.unix.bourne-bash | Previous | NextNext in thread | Find similar


Thread

Spotlight replacement cele_82 <cele_82@RMVlibero.it> - 2018-12-04 16:18 +0000
  Re: Spotlight replacement "Michael F. Stemper" <michael.stemper@gmail.com> - 2018-12-05 07:26 -0600
    Re: Spotlight replacement cele_82 <cele_82@RMVlibero.it> - 2018-12-08 20:50 +0000

csiph-web