Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Reply    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 01-20-2013
Registered User
 
Join Date: Dec 2009
Location: London
Posts: 776
Thanks: 51
Thanked 6 Times in 6 Posts
Creating .../ alias in bash

I want to create an alias as follows but is not working


Code:
alias ../='cd ../'

Sponsored Links
    #2  
Old 01-20-2013
Scott's Avatar
Scott Scott is online now Forum Staff  
Administrator
 
Join Date: Jun 2009
Location: Zürich
Posts: 6,950
Thanks: 220
Thanked 760 Times in 664 Posts
An alias should be named much like a variable is.
Sponsored Links
    #3  
Old 01-20-2013
Registered User
 
Join Date: Dec 2009
Location: London
Posts: 776
Thanks: 51
Thanked 6 Times in 6 Posts
So I can forget setting an alias like this?
    #4  
Old 01-20-2013
Scott's Avatar
Scott Scott is online now Forum Staff  
Administrator
 
Join Date: Jun 2009
Location: Zürich
Posts: 6,950
Thanks: 220
Thanked 760 Times in 664 Posts
No, I'm wrong. You just need to remove the / !
The Following User Says Thank You to Scott For This Useful Post:
kristinu (01-20-2013)
Sponsored Links
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Creating Alias for FILE newpromo Solaris 5 12-04-2009 11:10 AM
help needed with creating challenging bash script with creating directories I-1 Shell Programming and Scripting 7 04-29-2009 05:33 AM
bash alias help ynir Shell Programming and Scripting 3 06-12-2008 05:15 AM
Creating alias for directory path jasjot31 UNIX for Dummies Questions & Answers 3 09-25-2006 08:04 AM
ifconfig: difference between creating logical or alias network interface zaff IP Networking 5 11-22-2005 09:28 AM



All times are GMT -4. The time now is 01:13 AM.