sort, columns, no result! can I print files of "planes"?

hi,
please can I ask you for some help? I have data from 3D situation, x y z value
I'd like to use gnuplot to generate maps of the value in the planes z=0 to z=1 for example, my file looks
like

-0,012    0,0060    0,0    0,13972813076023477    
-0,012    0,0064319163    4,2894483E-4    0,1959584596359705    
-0,011398672    0,00644576    0,0    0,20924591828425124    
-0,012    0,0068638325    8,5788965E-4    0,19486370704346412    

also 4 columns, usorted, delimited by tab
I know how to do it the staff with the gnuplot, the problem is: how to generate files from this one, each containing only those points in the z=0.5 +- 0.05 for example?
i would like to have files
0.txt 0.1.txt 0.2.txt 0.3.txt 0.4.txt 0.5.txt ....

so I would need to sort the file by the 3rd column and the cut it into smaller files with the approx. same number in the 3rd column...

I've tried (excerpt from the script)

sed -i 's/,/\./g' .temp
maxx=$(awk 'max=="" || $'$sp' >max {max=$'$sp'} END{ print max}' FS="\t" .temp)
minn=$(awk 'min=="" || $'$sp' < min {min=$'$sp'} END{ print min}' FS="\t" .temp)
i=$minn
while [ "$(echo "$maxx > $i" | bc)" -eq 1 ]; do
awk '{if ($'$sp' > '$(echo "$i - $plus" | bc -l)' && $'$sp' <=$i) print $0 > "'$name'/0'$i'"}' FS="\t" .temp
i=$(echo "$i + $plus" | bc -l)
done

but the files are not well, there is problem with the minus sign in the first column. Can you help me, please?
Thank you

Using awk is probably the easiest way. It handles floating point arithmetics well (whereas bash doesn't):

$ cat input
-0.012    0.0060    0.0    0.13972813076023477    
-0.012    0.0064319163    4.2894483E-4    0.1959584596359705    
-0.011398672    0.00644576    0.0    0.20924591828425124    
-0.012    0.0068638325    8.5788965E-4    0.19486370704346412
-0.9	  0.5555	  1.0024	  944
0.9	  33		  100.7E-2     blah	
someValue 2ndCol	  -20.098e-1	  YES!
$ for z in -2 -1 0 1 2 ; do 
> echo "================ z=$z ==========" 
> awk -v"z=$z" '$3>z-0.05 && $3<z+0.05' input 
> done
================ z=-2 ==========
someValue 2ndCol	  -20.098e-1	  YES!
================ z=-1 ==========
================ z=0 ==========
-0.012    0.0060    0.0    0.13972813076023477    
-0.012    0.0064319163    4.2894483E-4    0.1959584596359705    
-0.011398672    0.00644576    0.0    0.20924591828425124    
-0.012    0.0068638325    8.5788965E-4    0.19486370704346412
================ z=1 ==========
-0.9	  0.5555	  1.0024	  944
0.9	  33		  100.7E-2	  blah
================ z=2 ==========

I use awk's -v switch to set the variable "z", and then outer shell loop to loop through it. Although you could as well (actually more efficiently) do the outer z loop within awk itself. The awk command is just the condition; which results in printing the line that fullfills the condition.
You can then easily redirect the output to a file, and sort the output files, if you like.
I have a feeling you can figure out the rest yourself, but if you need help, feel free to ask.