Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. lmm8294

    last three level of `pwd`

    It works fine. Thanks a lot. Really appreciate it.
  2. lmm8294

    last three level of `pwd`

    I have tried the second one, the script it self works very well. Thank you very much. But the problem is, it works only when I log on or su - to that user. The perl file /home/apoap003/test contains the code provided by ToolKit, and in the /home/apoap003/.profile I have PS1 defined as below...
  3. lmm8294

    last three level of `pwd`

    Thank you very much for Jim and ToolKit. It is really nice to get responses so quickly. All of your responses are really helpfule. I will try both ways and let you know if it works. Thank you very much again.
  4. lmm8294

    last three level of `pwd`

    I need to modify the .profile of an account, and I have this line in the .profile: PS1=`hostname`':$LOGNAME:$PWD>' But my boss want me to get only the last 3 levels of the subdirectory if `pwd` returns a long path. For example, if `pwd` returns...
  5. lmm8294

    Need to get last 3 layer of the current directory

    Thank you very much for the help of chgwhat and Tanda. I will ask my boss if he likes chgwhat's suggestion and also I will go to visit forum 219.
  6. lmm8294

    Need to get last 3 layer of the current directory

    Thank you for your reply. Actually I was thinking about the method you suggest, but I am so stupid that I don't know how to get the number of '/' from `pwd`. It should be only several lines of code, but I could not make it work. Could you provide me with a sample? Many thanks.
  7. lmm8294

    Need to get last 3 layer of the current directory

    I need to modify the .profile of an account, and I have this line in the .profile: PS1=`hostname`':$LOGNAME:$PWD>' But my boss want me to get only the last 3 levels of the subdirectory if `pwd` returns a long path. For example, if `pwd` returns...
  8. lmm8294

    Is there any way to get the last several subdirectories of `pwd`?

    I need to modify the .profile of an account, and I have this line in the .profile: PS1=`hostname`':$LOGNAME:$PWD>' But my boss want me to get only the last 3 levels of the subdirectory if `pwd` returns a long path. For example, if `pwd` returns...

Part and Inventory Search

Back
Top