My build of nnn with minor changes
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 line
269 B

  1. #!/usr/bin/env sh
  2. # Description: View a PDF file in pager
  3. #
  4. # Shell: POSIX compliant
  5. # Author: Arun Prakash Jana
  6. if ! [ -z "$1" ]; then
  7. if [ $(head -c 4 "$1") = "%PDF" ]; then
  8. pdftotext -nopgbrk -layout "$1" - | sed 's/\xe2\x80\x8b//g' | $PAGER
  9. fi
  10. fi