[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: shell script



On Wed, Mar 24, 2004 at 12:53:16PM +0100, loco@finanzaemetodi.biz wrote:
> hi I have this script:
> ##################################################
> 
> rm -f *.tmp
> 
> 
> while  read line; do echo -e "\nzone  \"${line}\" {
>       type master;
>       file  \"tuttoqui.zone\";
>       allow-transfer {
>              151.38.133.13;
>       };
> };\n" >>  named.tmp;  done < dominios.txt
> 
> 
> ##################################################
> 
> but I want jump the process whe in the  variable ${line} I have a string with ".it" anyting like
> ##################################################
> if (condition  ){

if ( echo ${line} | grep -q '\.it' - )

Brian



Reply to: