Skip to content

Instantly share code, notes, and snippets.

@nicerobot
Created January 24, 2013 16:24
Show Gist options
  • Save nicerobot/4624307 to your computer and use it in GitHub Desktop.
Save nicerobot/4624307 to your computer and use it in GitHub Desktop.
| wrap
#!/bin/bash
wrap() {
awk -v prefix="${1}" -v suffix="${2}" '{print prefix $0 suffix}'
}
([ "${1}" -a ! -t 0 ] && wrap ${1} ${2})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment