make getpeername() return the original socket address which before it was intercepted
[hband-tools.git] / user-tools / g_filename_to_uri
blob487daff720468159e888cf40a7cf2c809e7cfa86
1 #!/bin/bash
3 true <<EOF
4 =pod
6 =head1 NAME
8 g_filename_to_uri - Mimic g_filename_to_uri() GLib function creating a file:// url from path string
10 =cut
12 EOF
15 echo -n file://$1 | \
16 perl -pe 's{[^a-z0-9_!$~\x26-\x2E:@=+/]}{sprintf "%%%02X", ord$&}egi'