hlow all,
need your advice
i have sample.txt
1252468812,yahoo,3.5
1252468812,hotmail,2.4
1252468819,yahoo,1.2
1252468812,msn,8.9
1252468923,gmail,12
1232468819,live,3.4
1252368929,yahoo,9.0
1252468929,msn,1.2
now i want filtering with awk so output will like this
12524_log.txt
1252468812,hotmail,2.4
1252468819,yahoo,1.2
1252468812,msn,8.9
1252468923,gmail,12
1252468929,msn,1.2
12324_log.txt
1232468819,live,3.4
12523_log.txt
1252368929,yahoo,9.0
i using
awk -F "," '{close(f);f=$1}{print > f".txt"}' sample.txt
but this not like output i want get substr($1,0,5) not all $1
how i can do that
thx for your advice
---------- Post updated at 08:48 PM ---------- Previous update was at 08:03 PM ----------
done i solve this case