Im trying to make a little toolbox and for this I want to execute a script from .bashrc that writes a gnuplot file::
#!/bin/bash
echo 'set output' > pairwise.gp
echo "plot '" $1 "' u 1:2 w lp, '" $1 "' u 3:4 w lp" >> pairwise.gp
If I dont redirect the echo "" to a file, I get the output. If I execute the script with "./script test" from my current dir the file is executed properly.
I cannot execute the script properly from another dir when writing
/path/to/script test
Im wondering if I should just write
execute /path/to/script test
but Im running out of options