I've playing around with the SVN command line recently, and the inability to use UNIX command-line tools like
grep
has been irritating. I've done some Googling for Windows equivalents to the basic Unix command line toolkit, and here's what I've found.Unix | Windows | Notes |
---|---|---|
grep | findstr | Solid windows equivalent. You can do things like
to get the repository URL of your current working copy in SVN. |
backquotes | Use temp file with redirction | I wish windows allowed you to do this:
You can't, but here's a nifty workaround:You can further refine this with Windows' substring syntax
to strip out the "URL: " prefix. Now you placed your current working directory in a session variable. |
Still looking for a way to do a UNIX
tail
, which shows the last 10 lines of a file.Update: This comes with the Windows 2003 Resource Kit.
A hat tip to these blog posts:
- Substrings in Windows: this and
this. - Findstr as Windows' grep
- Backquote logic with tmp files.
- Microsoft's A-Z list
- Windows tail command
Check out cygwin. This is supposed to supply unix utilities on Windows. (Haven't used it myself siince all my machines run Linux.)
ReplyDelete--Dad