On 8/5/05, Michael Martinell <[EMAIL PROTECTED]> wrote:
>
>
> I am trying to figure out how to come up with a shell script that will cat
> or grep a file and if it contains the word SPAM it will then move it to
> another folder.
>
> I have been trying combinations of grep SPAM * | mv * ../spam h
On Fri, 05 Aug 2005 18:58:58 -0500, Michael Martinell wrote:
> I am trying to figure out how to come up with a shell script that will cat
> or grep a file and if it contains the word SPAM it will then move it to
> another folder.
>
> I have been trying combinations of grep SPAM * | mv * ../spam [
Ryan King writes:
> The other weirdish piece is the ">/dev/null", which is just so that it
> doesn't output anything even if it does match (which you expect to
> happen.
It's better to use -q. That way grep can terminate right away when it
finds the first match.
--
To UNSUBSCRIBE, email to [EM
On Fri, Aug 05, 2005 at 08:31:30PM -0400, Ryan King wrote:
> On Fri, Aug 05, 2005 at 06:58:58PM -0500, Michael Martinell wrote:
> > I have been trying combinations of grep SPAM * | mv * ../spam however I
> > don't know what to put in for * since the filenames are always changing.
>
> Try something
On Fri, Aug 05, 2005 at 06:58:58PM -0500, Michael Martinell wrote:
> I am trying to figure out how to come up with a shell script that will cat
> or grep a file and if it contains the word SPAM it will then move it to
> another folder.
>
> I have been trying combinations of grep SPAM * | mv * ../s
5 matches
Mail list logo