Skip to main content
added 8 characters in body
Source Link
posixKing
  • 1.3k
  • 2
  • 13
  • 13

Here is my alias.

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Thanks

Here is my alias.

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Here is my alias.

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Thanks

deleted 4 characters in body; edited tags
Source Link
Gilles 'SO- stop being evil'
  • 865.5k
  • 205
  • 1.8k
  • 2.3k

Here is my alias.

alias myAlias='myScript --option& && exit'

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Thanks

Here is my alias.

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Thanks

Here is my alias.

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Source Link
posixKing
  • 1.3k
  • 2
  • 13
  • 13

How to create an alias to run a command and exit in bash?

Here is my alias.

alias myAlias='myScript --option& && exit'

I want to run the script myScript with option option in background and then exit from bash. I want to set it up as an alias called myAlias in my bashrc file. However, I am getting an syntax error when I try to run myAlias. How to fix it?

Thanks