It is necessary to get part of the path, for example, "/home/server/folder1/rev.1111/bin" The necessary part is "rev.1111" I will try to parse the PWD and grep commands, but I am new to Linux and I cannot do this.
pwd | awk -F/ '{print $(NF-1)}'
Using the basename and dirname commands:
basename $(dirname $(pwd))
Source: https://habr.com/ru/post/895061/More articles:Auto Cast - javaIs phone mail support a standalone storage cache? - androidAccess element inside div via javascript - javascriptHow to configure grails / spring authentication scheme for each url? - springPerform implicit display at runtime - genericsAdmob does not fill the entire width - javaWhen do I need to call the resetProxy and clearSelf methods for an Actor? - scalahttps://translate.googleusercontent.com/translate_c?depth=1&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/895064/linking-several-oauth-accounts-to-a-single-user-whats-considered-safe-practice-and-whats-not&usg=ALkJrhhDJCdF5tBCzECqBKgrGoMyvwfx4ACan an Actors responder that uses a local thread variable throw an error? - scalaCan Devise + Omniauth have several types of logins? - ruby-on-railsAll Articles