Page 1 of 2 12 LastLast
Results 1 to 10 of 14

Thread: Ellipsis in bash?

  1. #1
    Join Date
    Nov 2009
    Location
    /..
    Posts
    52

    Default Ellipsis in bash?

    I was using bash, and playing around I found the "..." command (literally an ellipsis) and I was wondering what it did. I tried searching man pages, and Google wasn't very helpful (I guess there's not much documentation on it). I tried running it and found that it changed the directory but it didn't just go one up.
    Anyone know what it is?
    Linux motto: Here's the computer, just do stuff
    Dell Latitude D630: Core 2 Duo 2.00 GHz, 2GB RAM, 80 GB HDD, openSUSE 11.4, Windows Vista
    Weird people have all the fun

  2. #2
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Ellipsis in bash?

    ".." -> goes one directory up, eg /usr/share/doc/packages -> /usr/share/doc
    "..." -> goes two directories up, eg /usr/share/doc/packages -> /usr/share

  3. #3
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Ellipsis in bash?

    It's not a standard bash feature but something read in from the openSUSE alias files. If you do alias ... you will see:

    alias ...='cd ../..'

  4. #4
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: Ellipsis in bash?

    Correct, forgot to add that :S

  5. #5

    Default Re: Ellipsis in bash?

    Quote Originally Posted by camper365 View Post
    ... and Google wasn't very helpful ...
    Someone badly needs to make a 'google programmer', in which sequences of characters are properly dealt with. Try googling "bash $*".

    Code:
    function cds() {
      cd $1
      ls
    }
    On a slightly related note, I find this useful in my .bashrc. I couldn't quite bring myself to call it lsd instead.

  6. #6
    Join Date
    Nov 2009
    Location
    Uruguay
    Posts
    737

    Default Re: Ellipsis in bash?

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    openSuSE have many alias, try the command alias

    - --
    VampirD
    No in elenath hlar nan hd gn
    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v2.0.12 (GNU/Linux)
    Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org/

    iEYEARECAAYFAksUTRoACgkQJQ+0ABWtaVlakQCggu7tIpmlGfa/zPoaaIH0nXPT
    nn4AoMp6Me65ZhbKpLThkvnPZOYtI8dR
    =HIBz
    -----END PGP SIGNATURE-----

  7. #7
    Join Date
    Mar 2009
    Location
    London
    Posts
    426

    Default Re: Ellipsis in bash?

    Hi,

    You can also add whatever aliases you find helpful:
    Code:
    alias aliasname='commands to execute'
    eg:
    Code:
    alias quit='exit'
    You can, of course, make the commands as complicated as you like with pipes or several commands separated with semicolons.

    If you want to make it permanent just add the line to your 'bashrc' file.

    Regards,
    Barry.
    Desktop: openSUSE 11.3 (x86) LXDE
    Laptop: Arch Linux (x86_64) GNOME 3

  8. #8
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: Ellipsis in bash?

    Some of those SUSE aliases go back a long way. For example dir='ls -l' and md='mkdir -p' I remember were put there in the S.u.S.E days to make DOS users feel welcome.

  9. #9
    Join Date
    Mar 2009
    Location
    London
    Posts
    426

    Default Re: Ellipsis in bash?

    Quote Originally Posted by ken_yap View Post
    Some of those SUSE aliases go back a long way. For example dir='ls -l' and md='mkdir -p' I remember were put there in the S.u.S.E days to make DOS users feel welcome.
    When I first installed openSUSE I remember noticing the ability to use DOS commands; I was used to DOS from my Windows days, so I typed them automatically.

    I think it was helpful when I first used Linux.

    Now that I'm used to the Linux commands, I don't type the DOS commands anymore; however, when I use a Windows machine, I sometimes find myself typing Linux/UNIX commands.


    Regards,
    Barry.
    Desktop: openSUSE 11.3 (x86) LXDE
    Laptop: Arch Linux (x86_64) GNOME 3

  10. #10
    Join Date
    Nov 2009
    Location
    /..
    Posts
    52

    Default Re: Ellipsis in bash?

    I think what DOS needs to do is incorporate Linux commands because whenever I'm at school in Programming class I want to type ls instead of dir. I also like hitting Ctrl+D instead of typing exit to exit a command prompt or bash session.
    Linux motto: Here's the computer, just do stuff
    Dell Latitude D630: Core 2 Duo 2.00 GHz, 2GB RAM, 80 GB HDD, openSUSE 11.4, Windows Vista
    Weird people have all the fun

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •