I have a string formatted below
Walk Off the Earth - Somebody That I Used to Know
[playing] #36/37 1:04/4:05 (26%)
volume: n/a repeat: off random: on single: off consume: off
Now from this line I need to extract 36from #36/37.
The first thing I did was extract #36/37from the second line using
echo "above mentioned string" | awk 'NR==2 {print $2}'
Now I want to extract 36from the above part for which I did
echo `#36/37` | sed -e 's/\//#/g' | awk -F "#" '{print $2}'
who gave me 36as my outptut.
But I feel that using sed and awkonly to extract text from #36/37is just superfluous. So, is there a better or shorter way to achieve this.
source
share