This command will print the console the current coordinate of the target along the specified axis. Use 'player.getpos' get the position of your own character.
getpos [x / y / z] Target Command
|X / Y / Z||The axis you wish to view the target's coordinate (position) for. Either (without quotes): 'x', 'y' or 'z'.|
This command would print to the console the current x coordinate of your character.
This command would print to console the current y coordinate of the NPC/Object/Item you currently have selected as a target.