Display the last part of a number list

Hi ,
i have a file wich have 50+ of numbers like :

  
0.014544106
0.005464263
0.014526045
0.005484374
0.014539412
0.005467600
0.014558349
0.005452185

i would like to display the list from the 6th bit to the end for example

0.005452185 (should become) 2185.

I've tried with tail -c 4 filename but it display just the last one in the file.

Thanks!

Regards

Would this work?

grep -o '....$' Board27.numbers

If your system's grep utility does not support the -o option, you could also do this entirely in the shell (with any shell that performs basic POSIX-required parameter expansions) using:

while read -r line
do	printf '%s\n' "${line#${line%????}}"
done < file

which with your sample input file produces the output:

4106
4263
6045
4374
9412
7600
8349
2185
1 Like

How about the "Substring Parameter Expansion" (possibly not available in all POSIX compliant shells):

man bash :

printf '%s\n' "${line: -4}"

Thanks a lot!