Welcome to the Linux Foundation Forum!

Bash Scripting

I am trying to write a bash script that opens 3 different terminal windows and creates aliases and runs different commands in each window. I have the basics for opening the terminal windows and assigning them a title but when attempting to get an alias to work it wont take the alias. What I am using to open the windows is as follows for the first window and I repeat with the other two. "gnome-terminal --geometry 115X30+0+800 --title="WIN1" --command="bash -c 'source start.sh; 'cd /etc; z1; $SHELL'"

The start.sh listed is a script written with my aliases in it, z1 being one of them which does the following alias( alias z1="ls --color=none" ). But it doesn't want to take the alias for whatever reason, I have also tried just putting the alias command in and that doesn't work either. My next hurdle would be how to enter text at the command prompt but not have it entered, this in preparation to press enter and have that command execute when you need it next in line.

And if not here where can I go and ask this question to get assistance?

Comments

  • fcioanca
    fcioanca Posts: 2,179

    This course is related to open source management, it is not technical. Did you mean to post this in a different forum, for a different course?

Categories

Upcoming Training