Unix/Linux Go Back    


Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Creating .../ alias in bash

Shell Programming and Scripting


Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 01-20-2013   -   Original Discussion by kristinu
kristinu kristinu is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 21 April 2017, 6:13 AM EDT
Posts: 893
Thanks: 68
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   -   Original Discussion by kristinu
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 23 November 2017, 1:39 PM EST
Location: Zürich
Posts: 8,848
Thanks: 368
Thanked 1,205 Times in 1,029 Posts
An alias should be named much like a variable is.
Sponsored Links
    #3  
Old Unix and Linux 01-20-2013   -   Original Discussion by kristinu
kristinu kristinu is offline
Registered User
 
Join Date: Dec 2009
Last Activity: 21 April 2017, 6:13 AM EDT
Posts: 893
Thanks: 68
Thanked 8 Times in 8 Posts
So I can forget setting an alias like this?
    #4  
Old Unix and Linux 01-20-2013   -   Original Discussion by kristinu
Scott's Unix or Linux Image
Scott Scott is offline Forum Staff  
Administrator
 
Join Date: Jun 2009
Last Activity: 23 November 2017, 1:39 PM EST
Location: Zürich
Posts: 8,848
Thanks: 368
Thanked 1,205 Times in 1,029 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

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 12:10 PM
help needed with creating challenging bash script with creating directories I-1 Shell Programming and Scripting 7 04-29-2009 06:33 AM
bash alias help ynir Shell Programming and Scripting 3 06-12-2008 06:15 AM
Creating alias for directory path jasjot31 UNIX for Dummies Questions & Answers 3 09-25-2006 09:04 AM
ifconfig: difference between creating logical or alias network interface zaff IP Networking 5 11-22-2005 10:28 AM



All times are GMT -4. The time now is 02:41 PM.