24 lines
341 B
Bash
Executable File
24 lines
341 B
Bash
Executable File
#!/bin/sh
|
|
|
|
PORT=420
|
|
USER=erik
|
|
SERVER=fixedpoints.zapto.org
|
|
|
|
usage() {
|
|
>&2 echo "usage: twt post \"your post\"
|
|
twt show"
|
|
}
|
|
|
|
remote() {
|
|
ssh -p $PORT $USER@$SERVER $1
|
|
}
|
|
|
|
case $1 in
|
|
post) remote "echo -e '`date -Im`\t$2' >> ~/twtxt.txt"
|
|
;;
|
|
show) remote "cat ~/twtxt.txt"
|
|
;;
|
|
*) usage
|
|
;;
|
|
esac
|