On Jun 5, 2020, at 8:22, Roelof Berg wrote:
> 
> I will create a script named SubWCRev.sh with a content like:
> 
> #!/bin/bash
> echo -n "{\""
> echo -n `svn info | grep -e "^URL: " | sed 's/URL: //g'`
> echo -n "\",\""
> echo -n `svn info | grep -e "^Revision: " | sed 's/Revision: //g'`
> echo "\",\"\"}"
> 
> Thanks for your support, I don’t need access to svnwcrev anymore.

Or as a one liner with printf and awk saving a few process invocations:

#!/bin/bash
printf '{"%s"},"%d",""}\n' $(svn info | awk '/^URL:/ {print $2}') $(svn info | 
awk '/^Revision:/ {print $2}’)

Alfred

Reply via email to