I need to pass /DEF:c:\\filepath\\myLib.def\" command line option from a bash script to MS compiler/linker. The path is generated as part of build process by a bash script.
My bash foo is weak and I couldn't get regexes working in bash 3.1 so I hacked out a perl script for it:
#!/bin/env perl use strict; my @r; foreach my $e (@ARGV) { $e=~s/\//\\/g; $e=~s/^\\([A-Za-z])\\/\1:\\/; push @r, $e; } print join(" ", @r);