filtering with awk

i have question about awk
ex: input.txt

1252468812,yahoo,3.5
1252468812,hotmail,2.4
1252468819,yahoo,1.2
msn,1252468812,8.9
1252468923,gmail,12
live,1252468812,3.4
yahoo,1252468812,9.0
1252468929,msn,1.2

output.txt

1252468812,yahoo,3.5
1252468812,hotmail,2.4
msn,1252468812,8.9
1252468923,gmail,12

they will get 1252468812 in $1 and $2 in delimiter "," how will do that

thx before

Something like this?

awk -F, '$1==var || $2==var' OFS="," var="1252468812" file

@Franklin52
thx before

wheres output

awk -F, '$1==var || $2==var' OFS="," var="1252468812" file

ow sory thx i can get it but how to create output in file

awk -F, '$1==var || $2==var' OFS="," var="1252468812" file > newfile
mv newfile file
1 Like