Simon336697
asked on
Executing 2 commands one after the other
Hi guys,
Id like to issue 2 commands to linux one after the other and just would like your help.
This is what im trying to do.
In the .bashrc file, i have a list of aliases that I have entered which save me time with certain things.
One of them is as follows....
alias viewbash='grep alias ~/.bashrc'
So, if from a command line, i enter...
viewbash
I get a listing of all my aliases in the file .bashrc
What Id like to do is to enter
viewbash
at a command line,
but to first clear the screen before issuing the listing of all aliases.
I dont know how to change
alias viewbash='grep alias ~/.bashrc'
to a way to first clear the screen, the run
alias viewbash='grep alias ~/.bashrc'
Thank you.
Id like to issue 2 commands to linux one after the other and just would like your help.
This is what im trying to do.
In the .bashrc file, i have a list of aliases that I have entered which save me time with certain things.
One of them is as follows....
alias viewbash='grep alias ~/.bashrc'
So, if from a command line, i enter...
viewbash
I get a listing of all my aliases in the file .bashrc
What Id like to do is to enter
viewbash
at a command line,
but to first clear the screen before issuing the listing of all aliases.
I dont know how to change
alias viewbash='grep alias ~/.bashrc'
to a way to first clear the screen, the run
alias viewbash='grep alias ~/.bashrc'
Thank you.
ASKER
Thanks omarfarid appreciate it mate.
So if you wanted to execute multiple commands one after the other, are you saying that you separate each command with a semicolon?
Eg. A ; ?
So if you wanted to execute multiple commands one after the other, are you saying that you separate each command with a semicolon?
Eg. A ; ?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Tintin thank you mate :>)
Thanks omar.
You guys are great :>)
Thanks omar.
You guys are great :>)
alias viewbash='clear ; grep alias ~/.bashrc'