Mercurial > repo
view bin/f @ 9072:e40f22d106ef
<moon__> le/rn evilipse/ the most evil of evil people, likes to use chmod 000 / -R
author | HackBot |
---|---|
date | Sun, 25 Sep 2016 20:19:27 +0000 |
parents | de0c23a5db21 |
children |
line wrap: on
line source
#! /bin/bash cmd="$1" shift f="$*" if [[ -z "$f" && "$cmd" == *\ * ]]; then f="${cmd#* }"; cmd="${cmd%% *}"; fi if [[ -z "$f" ]]; then echo try: \`f command filename; elif [[ -e "$f" ]]; then "$cmd" "$(< "$f")"; else echo no such file: "$f"; fi