the case at hand:
nvidia-settings -q all | grep 'Attribute.*GPUCoreTemp'
gives:
Attribute 'GPUCoreTemp' (system5:0.0) 58.
Attribute 'GPUCoreTemp' (system5:0[gpu:0]): 58.
then I make it:
nvidia-settings -q all | grep 'Attribute.*GPUCoreTemp' | sed -e 's/.* //'
gives me:
58.
58.
But I only want the first one... How to achieve this?