1

I have a simple question. Is there a basic syntax to simply get the raw text output for a particular line in a particular file for a particular version using svn? I am looking for something like this. Let's say I want line 500 from MyFile.FOR version 6382:

svn line 500 MyFile.FOR 6382

How can I achieve this? Thanks

user32882
  • 5,094
  • 5
  • 43
  • 82

1 Answers1

1

I think you should do something similar:

svn cat MyFile.FOR -r6382 | sed -n '500p'

I hope this solution is clear - if not please let me know.

uzsolt
  • 5,832
  • 2
  • 20
  • 32
  • I'm getting `sed is not recognized as an internal or external command, operable program or batch file` – user32882 Feb 21 '18 at 09:53
  • What is your operating system? – uzsolt Feb 21 '18 at 10:50
  • Oops. I don't use Windows but I think the `| select -Index 499` (instead of `| sed...`) should work (see this https://stackoverflow.com/questions/14759649/how-to-print-a-certain-line-of-a-file-with-powershell ) – uzsolt Feb 21 '18 at 12:30
  • In that case I get this error: `'select' is not recognized as an internal or external command, operable program or batch file` .... And also I'm not using PowerShell but cmd – user32882 Mar 16 '18 at 10:45
  • @user32882: I'm not using Windows, sorry. – uzsolt Mar 18 '18 at 06:56