Do the same thing with the y-coordinates. The length of this line can be found by using the distance formula. You can echo the string and pipe it to wc command.
Let P 1 1 4 and P 2 5 1 Substitute these values into the distance formula.
Different properties are available depending on the type of layer youre using. Find the distance between the x-coordinates. Distance between two points is the length of a line segment that connects these points. Now wc command is used for counting number of lines characters in a file.