Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Prepend to Simply Expanded Variable

I am working with some MPI code that I need to run with mpirun.

I am using an already existing shell script and I want to prepend to an already existing line.

So the dream is:

app=mpirun $(app)

I know it is possible to append to a variable using +=, but can I prepend?

like image 512
Mikhail Avatar asked Jan 17 '23 01:01

Mikhail


1 Answers

If app should become (or remain) a simply expanded variable, then the following would be enough:

app := mpirun $(app)
like image 141
Eldar Abusalimov Avatar answered Jan 31 '23 09:01

Eldar Abusalimov