Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- eb script
- #!/bin/bash
- # mc clipboard is ~/.cedit/cooledit.clip
- #
- # 1. With no argument, transfers mc clipboard to stdout.
- #
- # 2. with argument of filename or "-", loads clipboard
- # from file or stdin. If that arg is preceded by "-a",
- # then file or stdin is appended to clipboard, not loaded.
- edbuf=~/.mc/cedit/cooledit.clip
- if [ -z "$1" ]; then
- cat $edbuf
- else
- if [ "$1" = "-a" ]; then
- shift
- if [ "$1" = "-" ]; then
- cat >> $edbuf
- else
- cat $1 >> $edbuf
- fi
- else
- if [ "$1" = "-" ]; then
- cat > $edbuf
- else
- cat $1 > $edbuf
- fi
- fi
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement