AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  AIX - PS1 prompt question

    Posted Thu June 28, 2012 05:20 AM

    Originally posted by: SystemAdmin


    I would like to have a PS1 prompt such that I get the following prompt everytime
    PWD
    >

    When we press enter it has to first show the current working directory followed by a new line having just '>' symbol.

    Eg:
    >
    > ls
    a b c dir1
    /tmp
    > cd dir1
    /tmp/dir1
    > cd dir2
    /tmp/dir1/dir2
    > cd dir3
    /tmp/dir1/dir2
    >

    Please advice


  • 2.  Re: AIX - PS1 prompt question

    Posted Thu June 28, 2012 07:10 AM

    Originally posted by: robint


    export PS1=$(pwd;echo "> ")


  • 3.  Re: AIX - PS1 prompt question

    Posted Thu June 28, 2012 08:42 AM

    Originally posted by: ColombianJoker


    export PS1='$PWD
    > '


  • 4.  Re: AIX - PS1 prompt question

    Posted Thu June 28, 2012 08:45 AM

    Originally posted by: robint


    Didn't test that, did you Joker?


  • 5.  Re: AIX - PS1 prompt question

    Posted Thu June 28, 2012 09:26 AM

    Originally posted by: ColombianJoker


    Yes, off course, look:

    http://cl.ly/122m362S0e3X1Y2L1h2Y


  • 6.  Re: AIX - PS1 prompt question

    Posted Thu June 28, 2012 09:35 AM

    Originally posted by: robint


    You're the man.
    Exit stage left, red faced....

    Rob