help on grep

Hi...

i have to generate a report and from that i have to grep some specific fields daily..
the command to generate report is "bro cdl"

then the output will be ..

abcd-001362 > bro cdl

COMMAND ACCEPTED - Browse Started

BROWSE CDLLOG
MM-8888   06-08-02 16:18:49 abcd MM-8888 L000000.00000 048826/682368
CDL:1       "Call Detail Log"
MID=0x28c2                            LAST\_PSMM\_ACT2_STR=0x10
CALL\_REF_NUM=0x13e9                           LAST\_PSMM\_ACT2_PHASE=0x0614
CBSC=8888                                     LAST\_PSMM\_ACT2\_BM_TYPE=3
MMADDR=0x99                                   LAST\_PSMM\_ACT3_CBSC=8888
etc etc......

i wrote a script for this ...

#!/bin/ksh

echo " Enter date :
read d
echo " Enter BTS Id :
read b
echo " Enter Sector :
read s
echo " Enter Carrier:
read c
echo " Enter CFC No :
read f
echo

BRO CDL startdate=$d enddate=$d starttime=00:01 endtime=23:59 ACCESS_BTS=$b ACCESS_SECTOR=$s ACCESS_CHANNEL=$C CFC=$f | egrep "MID|CBSC|MMADDR"

but while execcuting i am getting error like ..

ERROR
gin.txt[20]: browseCmd: not found

also i want to collect the output to a diff file name through script

HELP PLS....

Should BRO CDL be lowercase?

if i directly entered "bro cdl" both caps and small will accept...

but through script error is coming

It is not a grep error. cdl browse is complaining. Remove the

| egrep "MID|CBSC|MMADDR"

part. the egrep section IS on the same line as the rest of the command, right?

Did u check PATH variable?
BRO CDL should in the search PATH else it cannot understand it as an action

its not a grep problem...
grep is working fine ...

the bro cdl command is also working fine when i type directly...
but when i try it through script its not working

how to check the path variable..

try this on the command prompt.
echo $PATH
in case this doesnot include the directory where your BRD CDL resides, add it in some environment file say .profile or .zshrc etc so that it will be in effect when you login.

Alternativley you can give the full path of the BRO CDL in the script.
/dir1/dir2/BRO CDL < options > etc..