substituing $1 one time but not the other
- From: "patrice" <patrice_labracherie_nospam@xxxxxxx>
- Date: Wed, 27 Sep 2006 18:44:16 +0200
Hello
I want to get the name of a mail file using its message ID.
I 'm using :
grep '^Message-ID: <my id>$' myfolder/* | awk -F ':' '{print $1;}'
and it work fine.
now i want to put this line in a shell script with 2 params: myid and
myfolder
so :
grep '^Message-ID: <$1>$' $2/* | awk -F ':' '{print $1;}'
but it does not work because of the awk argument 'print $1 ' .
the command line is substitued by
grep '^Message-ID: <myid>$' myfolder/* | awk -F ':' '{print myid;}'
how can i tell the shell to not substitute the print $1 ?????
.
- Follow-Ups:
- Re: substituing $1 one time but not the other
- From: Stephane CHAZELAS
- Re: substituing $1 one time but not the other
- From: Barry Margolin
- Re: substituing $1 one time but not the other
- From: Ed Morton
- Re: substituing $1 one time but not the other
- Prev by Date: Re: Grep can find a pattern in a text, but not in a file
- Next by Date: Changing UnixID
- Previous by thread: subtotalling identical records
- Next by thread: Re: substituing $1 one time but not the other
- Index(es):
Relevant Pages
|