1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/usr/bin/bash convert_path() { local ARG="$1" ARG="${ARG//C:\\//c/}" ARG="${ARG//c:\\//c/}" ARG="${ARG//C:\///c/}" ARG="${ARG//c:\///c/}" echo "$ARG" } declare params=() for x in "${@}" do params+=("$(convert_path "${x}")") done "${params[@]}"