26 lines
518 B
Bash
26 lines
518 B
Bash
#!/usr/bin/env bash
|
|
|
|
# Copyright (c) 2014, Ray Donnelly
|
|
#
|
|
# Usage: paths-from-unix-to-windows <infilelist> <outfilelist> <replace>
|
|
#
|
|
# <infilelist> File containing a list of Unix filenames.
|
|
#
|
|
# <outfilelist> File to write Windows (mixed) filenames to.
|
|
#
|
|
# <replace> String to replace
|
|
|
|
in_filelist=$1; shift
|
|
out_filelist=$1; shift
|
|
replace=$1
|
|
|
|
echo -n "" > ${out_filelist}
|
|
|
|
while read line
|
|
do
|
|
_temp=$(cygpath -m $line)
|
|
echo ${_temp#$replace} >> ${out_filelist}
|
|
done < ${in_filelist}
|
|
|
|
exit 0
|