- May
- 80
- 0
I'm trying to do this:
(from bash)
As you can see, it uses advanced quoting, with multiple quotes, some of which are not really usable from Windows and TCC.
I'm sure I can do the same thing using simple TCC commands, but I'd like this to run first to be able to replicate the whole functionality.
I've gotten so far:
This uses double quotes (because Windows, apparently) and \" to escape the quotes (I have no idea who does this - I'd guess TCC, but I've never seen escaping a quote with "\" before.
This unfortunately outputs
instead of
If I don't use the escape for the redirection characters (< and >), I get
It would seem that you're damned if you do, damned if you don't with this.
I'll do it another way (I'm sure that @WORD will come in handy here), but the real question is, how can you pass the proper second parameter to awk?
(from bash)
Code:
svn log -q | awk -F '|' '/^r/ {sub("^ ", "", $2); sub(" $", "", $2); print $2" = "$2" <"$2">"}' | sort -u > authors-transform.txt
As you can see, it uses advanced quoting, with multiple quotes, some of which are not really usable from Windows and TCC.
I'm sure I can do the same thing using simple TCC commands, but I'd like this to run first to be able to replicate the whole functionality.
I've gotten so far:
Code:
svn log -q | awk -F "|" "/^r/ {sub(\"^ \", \"\", $2); sub(\" $\", \"\", $2); print $2\" = \"$2\" ^<\"$2\"^>\"}"
This uses double quotes (because Windows, apparently) and \" to escape the quotes (I have no idea who does this - I'd guess TCC, but I've never seen escaping a quote with "\" before.
This unfortunately outputs
Code:
user = user ^<user^>
Code:
user = user <user>
If I don't use the escape for the redirection characters (< and >), I get
Code:
TCC: (Sys) Access is denied.
"C:\}"
It would seem that you're damned if you do, damned if you don't with this.
I'll do it another way (I'm sure that @WORD will come in handy here), but the real question is, how can you pass the proper second parameter to awk?