Difference between revisions of "Bash: alias"

From wikieduonline
Jump to navigation Jump to search
Line 13: Line 13:
 
  alias NF="awk '{print \$NF}'"
 
  alias NF="awk '{print \$NF}'"
  
  alias [[sourceprofile]]="source ~/[[.bash_profile]]"
+
  alias [[sourceprofile]]="[[source[[ ~/[[.bash_profile]]"
 +
alias [[zsourceprofile]]="source [[.zprofile]]"
  
 
  alias p8="ping 8.8.8.8"
 
  alias p8="ping 8.8.8.8"

Revision as of 19:39, 11 November 2021

alias does not accept parameters but a function can be called just like an alias


Examples

  • Execute alias to display your aliases
alias trim="awk ' {\$1=\$1} 1 '"

alias g="grep"
alias gi="grep -i"
alias gv="grep -v"
alias NF="awk '{print \$NF}'"
alias sourceprofile="[[source[[ ~/.bash_profile"
alias zsourceprofile="source .zprofile"
alias p8="ping 8.8.8.8"
alias mp="multipass"
alias viconfig="vi ~/.ssh/config"

Related terms

See also

Advertising: