Mercurial > repo
view paste/paste.25005 @ 7759:b4341511eb47
<fizzie> ` echo -e \'#! /bin/bash\\ncmd="$1"\\nshift\\nf="$*"\\nif [ -z "$f" && "$f" == *\\\\ * ]; then f="${cmd#* }"; cmd="${cmd%% *}"; fi\\nif [ -z "$f" ]; then echo try: \\\\`f command filename; else "$cmd" "$(< "$f")"; fi\' > bin/f
author | HackBot |
---|---|
date | Wed, 04 May 2016 21:35:48 +0000 |
parents | e037173e0012 |
children |
line wrap: on
line source
#!/bin/sh topic=$(echo "$1" | tr A-Z a-z) [ -e "wisdom/$topic" ] || { echo "$1? ¯\(°_o)/¯"; exit 1; } cat "wisdom/$topic"