dotfiles/.bin/lspaste

7 lines
227 B
Plaintext
Raw Normal View History

2022-12-06 08:01:44 +01:00
#!/bin/sh
. $HOME/.bin/_config
ssh $USER@$DOMAIN "cd $RPATH/p && ls -tr1 | xargs file --mime-type" \
| awk -F'[ :]*' -v url="https://$DOMAIN" \
'{if ($2 ~ /^image/) { print url"/I/p/"$1 } else { print url"/0/p/"$1 }}'