Re: [Linuxcommand-discuss] how to (and where) create global shell variables
Brought to you by:
bshotts
|
From: William S. <bs...@pa...> - 2002-11-24 16:12:25
|
On Sun, 2002-11-24 at 09:49, Mertens Bram wrote: > Hi, > > There are a couple of directories that I need frequently in certain > commands (cd, cp, mv,...) is it possible to create variables that hold > these paths? > > e.g. > instead of typing: cd /mnt/shared/music/lyrcis > type: cd $LYRICS (where $LYRICS is /mnt/shared/music/lyrcis) > > Can I simply add 'LYRICS="/mnt/shared/music/lyrcis"' to my '~/.bashrc'? > > Or is there a better way? > Using an environment variable as you describe is a common approach to this problem. Another way would be to create aliases for the common commands you use. -- ||||| William Shotts, Jr. (bshotts AT panix DOT com) ||||| Be a Linux Commander! Follow me to http://linuxcommand.org |