As above I'm running this grep command which works as it should but how do I store the returned value into a variable?
cat data.txt | grep "" |cut -d\, -f1
I tried this but it didn't work:
rig=$(cat data.txt | grep "" |cut -d\, -f1)
seems to be working for me so I will go with this unless anyone else has any pointers on how to improve the above?