I am trying to write a bash script that opens a new gnome terminal window and runs an aliased command. I have seen that instead of using aliases using a function is the proper way to go. I have tried both approaches but I can't get it to work though, as I am getting an error that the command is not recognized.
This is what I have.
#!/bin/bash
# Cluster related functions
function gateway () {
ssh user@something -t ssh gateway
}
gnome-terminal --window-with-profile=Bash -- bash -c "gateway; bash;"
The error I'm getting is:
bash: gateway: command not found