Select particular string using AWK

Hi all,
i searched this forum for the awk help i needed but i couldnt get any thread matching to my problem,
My problem is
i have a file

file1 {
<Server CloneID="13k6equ4c" Name="EnterpriseServicesClone2">
<Server CloneID="13k6eqvi1" Name="EnterpriseServicesClone1">
<Server CloneID="13k6er1lu" Name="INTLEStatementClone1">
<Server CloneID="13k6er4id" Name="GlobalMRClone1">
<Server CloneID="13k6er6lg" ConnectTimeout="3" Name="GlobalUserManagementClone1">
<Server CloneID="13k6erbi4" ConnectTimeout="3" Name="USEStatementClone1">
<Server CloneID="13k6erd1h" ConnectTimeout="3" Name="USEStatementClone2">
<Server CloneID="13k6erfkj" Name="MYCAServicesClone2">
<Server CloneID="13k6erh8n" Name="MYCAServicesClone1">
<Server CloneID="13k6erk21" Name="DocGenClone1">
<Server CloneID="13k6ern9r" Name="OnlineDisputesClone1">
<Server CloneID="13k6erqb0" Name="TransferClone1">
<Server CloneID="13ta8bqd3" Name="BasicServicesClone2">
<Server CloneID="13tacbiag" Name="BasicServicesClone1">
<Server CloneID="13k6er95a" ConnectTimeout="3" Name="USAccountSummaryClone1">
<Server CloneID="13v8rg2qo" ConnectTimeout="3" Name="USAccountSummaryClone2">
}

Now my problem is i want output as:

EnterpriseServicesClone2
EnterpriseServicesClone1
INTLEStatementClone1
GlobalMRClone1
GlobalUserManagementClone1
USEStatementClone1
USEStatementClone2
MYCAServicesClone2
MYCAServicesClone1
DocGenClone1
OnlineDisputesClone1
TransferClone1
BasicServicesClone2
BasicServicesClone1
USAccountSummaryClone1
USAccountSummaryClone2

but when i am using command as
awk -F"Name" '{print $2}' | |awk -F"\"" '{print $2}'

i am not getting the proper output

The output is coming like this:

ame="EnterpriseServicesClone2
ame="EnterpriseServicesClone1
ame="I
ame="GlobalMRClone1
ame="GlobalUserManagementClone1
ame="USEStatementClone1
ame="USEStatementClone2
ame="MYCAServicesClone2
ame="MYCAServicesClone1
ame="DocGenClone1
ame="OnlineDisputesClone1
ame="TransferClone1
ame="BasicServicesClone2
ame="BasicServicesClone1
ame="USAccountSummaryClone1
ame="USAccountSummaryClone2

Can anybody help??

Thanks in advance..

You don't need awk for this task:

sed -n 's/.*Name="\([^"]*\).*/\1/p' infile

assuming the 'Name' appears at the tail end of the record/line:

nawk -F'"' '{print $(NF-1)}' myFile
awk -F "\"" '/^<Server/ {print $(NF-1)}' infile
sed 's/^\(.*\)\(Name="\)\([^"]*\)\(".*\)/\3/' filename

Hi all,
i have one more doubt with this sed

i have a line

"Instrumentation-MetricsThread:4 of 5" daemon prio=5 tid=0xfacf10 nid=0x39 waiting on monitor [0xba181000..0xba181a00]

here i need output as 0xfacf10 the value after tid=

But here i cannot use awk awk -F" " '{print $6}'
as this is just a sample and the position of this value tid=value may change to 3rd or 4th position.

Can anyone give sed code to just select value after tid= and nothing after that.

Thanks

$
$ echo "Instrumentation-MetricsThread:4 of 5" daemon prio=5 tid=0xfacf10 nid=0x39 waiting on monitor [0xba181000..0xba181a00] | sed 's/.*tid=\([^ ]*\) .*/\1/'
0xfacf10
$

tyler_durden

sed 's/.*tid=\([^ ]*\) .*/\1/g' file

or

awk '{for(i=1;i<=NF;i++)if ($i ~ /t\id=/){print substr($i,index($i,"=")+1,length($i)-m)}}' file

cheers,
Devaraj Takhellambam