I have the following file names:
1
2
3
4
0
0.1
0.2
1e-0.3
1e-3
a
v
I am using Ubuntu, and would like to grep all numeric values except the value 0.
I tried ls | grep -E '[-+]?[0-9]*\.?[0-9]+([eE][-+]?[0-9]+)?' and it gets all numerical entries with the exponential.
But I would like to exclude the file named 0. Only the 0, and not 0.1 or 0.2
The desired output is:
1
2
3
4
0.1
0.2
1e-0.3
1e-3
Where all numeric files are listed except the file 0.
Best Regards