0
I am trying to extract range from IP= to TUAL_HOSTNAME_=, as below.
But its also extracting other match pattern for IP.
sed -i -e '/IP=/,/TUAL_HOSTNAME_=/{w /tmp/101' -e 'd}' /tmp/install;
#IP=
#AS_HOSTNAME=
#ASDM_USERID=
#ASRP_GROUPID=
#D_HOSTNAME=
#ASE_NODENAME=
#ASE_HOSTNAME=
#PP_NAME_1=
#USTER_NAME_1=
#NITIAL_HEAPSIZE_1=
#AX_HEAPSIZE_1=
#TUAL_HOSTNAME_1=
#
#
#
sed -i "s/^$IP\(.*\)$/$IP\1 $AS_HOSTNAME/" /etc/hosts;
#
#
#
#
sed -e '/PF/,/PF1/{w /tmp/wserver' -e 'd}' "$ASCRPT";
Is there a way to match exact pattern and extract it.
Thanks
Raajesh
Hello and welcome to SuperUser. I can't really understand what you're trying to do. What is the code you posted? Could you post the text you want to match against, and the desired result? – m4573r – 2014-03-07T18:49:25.380