Skip to content

Instantly share code, notes, and snippets.

@timshen91
Created February 7, 2013 09:34
Show Gist options
  • Save timshen91/4729838 to your computer and use it in GitHub Desktop.
Save timshen91/4729838 to your computer and use it in GitHub Desktop.
./this.sh < $goagent/local/proxy.pac > out # "*" is reserved for matching any string. NO WARRANTY.
#!/bin/sh
sed 's|^.*if(\(.*\)/i\.test(url)) *return.*|\1|g' |
sed 's|^[^:]*:||' |
sed 's|\\\(.\)|\1|g' |
sed 's|\.\*|*|g' |
sed 's|^[^a-zA-Z0-9]*||'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment