Page 1 of 1

--exec-after-init in a bash script [SOLVED]

Posted: Sat Dec 30, 2023 1:27 pm
by alextone
A simple question, related to building up a bash script to start multiple apps in sequence.

When using the --exec-after-init command to start cat, with an lscp file, everything goes ok. However, I can't seem to have linuxsampler start first, then run the cat command from the next line entry.

Here's the script entry that works:

linuxsampler --exec-after-init "cat /home/alex/Documents/lscp-files/VPO-1-ks.lscp | netcat localhost 8888" &

I'm trying to separate linuxsampler from the cat command and file load, and this doesn't work:

linuxsampler &

cat /home/alex/Documents/lscp-files/VPO-1-ks.lscp | netcat localhost 8888

The lscp file doesn't load at all, even if I put the exec command before cat, or i wrap the entire cat line/lscp/netcat in quotation marks.

Why am I doing this? If something doesn't work, I can''t just stop linuxsampler with a kill command from the terminal.
If i don't load the lscp cat line with --exec-after-init, I can.


Any clues?

EDIT: Solved.