I have been using fifos for controlling mpg123 player, there every-time I need to execute these 3 commands
mkfifo a // create fifo
cat > a & //to run it indefinately
mypid=$! //assign some dummy pid
I want to put this into some script which would execute it at the boot, i wrote a script containing these commands. but it was not working, after some search i got i had to execute it like
. test.sh
manually i can execute it like the above way but automatically how to execute i am struggling.?
EDITED
test.sh
cd /root/work/
now executing this as ./test.sh will not change directory on terminal as it is executed in child process, and executing it as . test.sh will change the directory to /root/work.
I want to execute it as . test.sh through some function/script or anything that i can put at startup and at every boot it runs