-1

I am trying to run this command

svn info svn://xyz-repo/svn/xyzclientjs/branches/features/CRE-406 | grep 'Relative URL'

which gives me this

Relative URL: ^/branches/features/CRE-406

I want to copy everything after the "^/"

so I only get this as output

branches/features/CRE-406

I tried using grep -v "^/" 'Relative URL' but it didnt worked. Please any suggestions are highly appreciated

samkraken
  • 31
  • 1
  • 8

1 Answers1

0

If you have GNU grep, you can use Perl syntax regex:

svn info svn://xyz-repo/svn/xyzclientjs/branches/features/CRE-406 | grep -Po 'Relative URL: \^/\K.*'

See also related answer https://stackoverflow.com/a/5081519/72178.

ks1322
  • 33,961
  • 14
  • 109
  • 164