Hi, all
I have a file containing the following data:
name: PRODUCT_1
date: 2010-01-07
really_long_name: PRODUCT_ABCDEFG
I want to get the date (it is "2010-01-07" here), I could use the following code to do that:
awk -F: ' / *date/ { print $2 } '
But the result is not exactly what I want, there're spaces before the date output.
Is it possible to remove spaces before processing each line? so I could use the following code:
awk -F: ' $1=="date" { print $2 } '