citadel

My dotfiles, scripts and nix configs
git clone git://jb55.com/citadel
Log | Files | Refs | README | LICENSE

readlater (282B)


      1 #!/usr/bin/env bash
      2 
      3 set -e
      4 
      5 tmp=$(mktemp)
      6 cat > "$tmp"
      7 fname="$1"
      8 
      9 if [ -z $1 ]; then
     10 	printf "usage: readlater fname.txt\n"
     11 	exit 2
     12 fi
     13 
     14 fname=${fname%.txt}.txt
     15 
     16 mkdir -p $HOME/docs/queue
     17 mv "$tmp" "$HOME/docs/queue/$fname"
     18 printf "Added '$fname' to read queue\n" >&2
     19 rm -f "$tmp"