Mercurial > repo
view bin/shebang_args_or_input @ 8695:b09f2c5c49dd
<oerjan> ` chmod +x she*; mv she* bin
author | HackBot |
---|---|
date | Tue, 05 Jul 2016 01:20:24 +0000 |
parents | ebcf284eeb4f |
children | 0a87835bb2f3 |
line wrap: on
line source
#!/bin/bash interp="$1"; script="$2"; shift 2; if [ "$#" -gt 0 ]; then printf '%s\n' "$*"; else cat; fi | ${interp/"//"/ } "$script"