I totally dislike asking questions in forums but this one eats up to much of my time I need to spend on other topics.
I have a shell-script in which I call a terminal.
I want to invoke bash inside the terminal and print a message inside bash with aid of a here document.
Here documents require that EOF is at the start of the on a separate line and that is the only text on the line, so using you code as an example, you would need something like this
cat <<EOF
echo some stupid text
EOF
Alternatively you could use a here-string
Passing a function is possible with bash through an export of the function, but can this easily become a security risk, so imho is best avoided.
For passing text to a sub process you can use a named pipe if you just want it to display the message,
or use bash 4's coproc functionality for a two-way pipe.
---------- Post updated at 06:43 AM ---------- Previous update was at 06:25 AM ----------
I'd really like to avoid it but I guess I am simply going to put the message in a file. I hate it if things don't work out like I want it. .-)
If someone knows a one-line solution I'd really like to know it!
But it seems difficult as there are several subshells involved and bash supposedly has some security mechanisms in conflict with the task to solve.
works. You said that some unspecified command fails, but don't show us what command you used and you don't tell us how it failed. Without clearly seeing what you're trying to do and knowing how what you have tried fails, it is really hard to suggest alternatives that might work for you.
Please show us what command you are trying to get bash to run in the terminal window you are opening, tell us what output is being produced, and tell us what output you were hoping to produce.
I thought it was self-explaining and didn't need any further explanation what I am trying to accomplish with this quite easy to understand fragment of a script.
Well, I just tried to present a solution but the ******* code-tags don't like my strict browser settings I guess.
However, the man page of the terminals might help... helps..
However, I am a bit ****** off actually because of the whole java-stuff going on this server stealing my time. I asked for the delete of my account.
I am afraid I am no more interested in the post.
Sorry.