0

I am trying to run Variable as command with aliases sourced from file

Bash script file:

source /...path_to_file.../file.txt
#. /...path_to_file.../file.txt

CMD="$...variable1..."' '"$...variable2..."

bash -c -i "$CMD" 2>&1 &    ...this works ok, as expected.

Afterwards when I press any key, Logout and Exit pop-ups in terminal line and terminal close itself.

I had tried:

shopt -s expand_aliases ...didnt help

set -o ignoreeof ...didnt help

How can I run Bash script file with Bash command including expanded alias in interactive mode (shell) and prevent Terminal (NOT to) logout and exit?

Barmar
  • 669,327
  • 51
  • 454
  • 560
Scripter
  • 11
  • 2

0 Answers0