Thread: bash variables

    #1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Svizzera
    Posts
    69
    Rep Power
    13

    bash variables


    i would like that i see when im in the shell.
    that i see which server, which user, which path

    thanks
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    68
    Rep Power
    11
    >that i see which server
    $ hostname

    >which user
    $ logname

    >which path
    $ $PATH
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2001
    Location
    Svizzera
    Posts
    69
    Rep Power
    13

    bashprompt


    sorry that i didn't ask in a understanding way.
    i want to no how can i define variables of my bashprompt.

    i want to have something like:

    myserver:myuserwd>

    i hope you all understand what i mean.



    cheers
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    68
    Rep Power
    11
    >i hope you all understand what i mean
    That was my second guess. You need to cast the incantation:
    Code:
    $ man bash
    The shell man pages tell you exactly how to set up your prompt. If I just went and told you, you'd miss out on a lot.

IMN logo majestic logo threadwatch logo seochat tools logo