Sponsored Content
Full Discussion: NEED HELP
Top Forums Shell Programming and Scripting NEED HELP Post 302429801 by aster007 on Tuesday 15th of June 2010 03:05:54 PM
Old 06-15-2010
Try this

Code:
TEMP_VAR=`find . -type f -iname "*xml*"`

echo $TEMP_VAR | while read X
do
    cat $X | grep "MIG_Host"
    
    if [[ $? -eq 0 ]];
    then
        cat $X | sed "s/217.171.101.225/100.100.100.100/g" > temp_file
        chmod 777 $X
        cat temp_file > $X
        rm -f temp_file
    fi
done

 
All times are GMT -4. The time now is 01:05 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy