I can allocate a path to a certain variable from bash:
VAR1=/home/alvas/something
I can find it automatically:
$ cd
$ locate -b "something" .
/home/alvas/something
/home/alvas/someotherpath/something
But how do I assign the first result from locate as a variable's value?
I tried the following but it doesn't work:
alvas@ubi:~$ locate -b 'mosesdecoder' . | VAR1=
alvas@ubi:~$ VAR1
VAR1: command not found