Thanks guys!
really appreciate ur quick response.
i've another doubt here.
sometimes the script (let say ABC) print the SIMILAR report file twice but to DIFFERENT department.
For example, ABC contains
lp -d lp06 -t 'REPORT FOR FINANCE -FIN-' $daily/FINRPT
lp -d lp06 -t 'REPORT FOR MANAGEMENT -MGMFIN-' $daily/FINRPT
lp -d lp06 -t 'REPORT FOR FINANCE -FIN1-' $daily/FINRPT1
lp -d lp06 -t 'REPORT FOR HUMAN RESOURCE -HR-' $dd_daily/HRRPT
lp -d lp06 -t 'REPORT FOR MANAGEMENT -MGM-' $dd_daily/MGMRPT
:
:
:
So, when we grep out the report filename, the similar report filename would appear TWICE as below:
FINRPT
FINRPT
FINRPT1
HRRPT
MGMRPT
is there any possible way for us to get rid of the redundancy instead,
but getting the result (with FINRPT only appear ONCE):
FINRPT
FINRPT1
HRRPT
MGMRPT
Thanks in advanced.