Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Creating .../ alias in bash

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-20-2013
kristinu kristinu is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 28 May 2015, 9:11 AM EDT
Posts: 868
Thanks: 63
Thanked 8 Times in 8 Posts
Creating .../ alias in bash

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


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

Sponsored Links
    #2  
Old Unix and Linux 01-20-2013
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 29 June 2015, 1:20 PM EDT
Location: Zürich
Posts: 8,568
Thanks: 337
Thanked 1,080 Times in 938 Posts
An alias should be named much like a variable is.
Sponsored Links
    #3  
Old Unix and Linux 01-20-2013
kristinu kristinu is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 28 May 2015, 9:11 AM EDT
Posts: 868
Thanks: 63
Thanked 8 Times in 8 Posts
So I can forget setting an alias like this?
    #4  
Old Unix and Linux 01-20-2013
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 29 June 2015, 1:20 PM EDT
Location: Zürich
Posts: 8,568
Thanks: 337
Thanked 1,080 Times in 938 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
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux 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 03:13 PM.