A Byte of my 2.2-lb Brain

Just sharing stuff…

Bash Scripting Aliases

For scripts I usually create a filename.sh and then make the file executable. I learned a new trick today from a colleague, which is to edit the bash_profile.

$ vi ~/.bash_profile

When you execute this you’ll see the aliases. For example,

alias ipy="python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'"

If you want a new script, just add another alias line (purple font below) next to the first alias. For example,

alias ipy="python -c 'import IPython; IPython.terminal.ipapp.launch_new_instance()'"
alias sshme = "ssh -X erikafille@the.server.addy.here"

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Information

This entry was posted on July 31, 2015 by in Geek and tagged .
%d bloggers like this: