Mercurial > repo
view bin/f @ 9280:2d58b8902aa7
<oerjan> addquote <hppavilion[1]> THEY MADE A MOVIE ABOUT THE 50 SHADES SEQUEL TOO! <hppavilion[1]> Somebody shall pay for this <imode> not me, I ain\'t buyin\' a ticket.
author | HackBot |
---|---|
date | Fri, 14 Oct 2016 15:37:50 +0000 |
parents | c989a1669243 |
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