Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

macsig

macrumors regular
Original poster
Oct 27, 2006
236
0
Marina del Rey, CA
Hello guys,
How can I edit .bashrc ?
I'm playing around with RVM and I need to add a line at the end of that file but I have no idea how to do that.

Thanks
 

angelwatt

Moderator emeritus
Aug 16, 2005
7,852
9
USA
If you don't know how to edit you may want to rethink editing it as it can cause problems if you mess up. But if you want to, just open Terminal and enter the following.
Code:
pico ~/.bashrc
or to open in TextEdit.
Code:
open -t ~/.bashrc
 

mac2x

macrumors 65816
Sep 19, 2009
1,146
0
Another handy tip for the command line is the more command, which lets your view documents like .bashrc without opening an editor. Obviously, you must open it in a text editor to actually change anything.

Code:
$ more .bashrc
 

Hal Itosis

macrumors 6502a
Feb 20, 2010
900
4
But if you want to, just open Terminal and enter the following.
Code:
pico ~/.bashrc
FWIW, pico has been removed from OSX (since Tiger i believe) and replaced with nano.

Apple has provided a symlink, so that the "command" pico will still appear to function:
Code:
$ [COLOR="Blue"]type -a nano pico[/COLOR]
nano is /usr/bin/nano
pico is /usr/bin/pico

$ [COLOR="Blue"]ls -l `whereis nano pico`[/COLOR]
-rwxr-xr-x  1 root  wheel  297424 Sep 23  2007 /usr/bin/nano
lrwxr-xr-x  1 root  wheel       4 Mar 14  2009 /usr/bin/pico -> nano
 

larkost

macrumors 6502a
Oct 13, 2007
534
1
FWIW, pico has been removed from OSX (since Tiger i believe) and replaced with nano.

Apple has provided a symlink, so that the "command" pico will still appear to function

This is fairly standard in *nix's. nano was designed to be a drop-in replacement for pico, and you have to be pretty savy to tell them apart.
 

Hal Itosis

macrumors 6502a
Feb 20, 2010
900
4
This is fairly standard in *nix's. nano was designed to be a drop-in replacement for pico, and you have to be pretty savy to tell them apart.
I know what you mean, but i couldn't resist...
Code:
$ [COLOR="Blue"]pico foo[/COLOR]

GNU [COLOR="Magenta"][B][SIZE="3"]nano[/SIZE][/B][/COLOR] 2.0.1[SIZE="1"]                 File: foo
_




                                [ New File ]
^G Get Help ^O WriteOut ^R Read File^Y Prev Page^K Cut Text ^C Cur Pos
^X Exit     ^J Justify  ^W Where Is ^V Next Page^U UnCut Tex^T To Spell
[/SIZE]
;) (at least that's what an OSX user gets)
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.