sistema_progs

Programas para customizar o meu entorno de traballo nos meus equipos persoais
Log | Files | Refs

mimelist (347B)


      1 #!/usr/bin/env sh
      2 
      3 # Description: Find and list files by mime type in smart context
      4 #
      5 # Shell: POSIX compliant
      6 # Author: Arun Prakash Jana
      7 
      8 . "$(dirname "$0")"/.nnn-plugin-helper
      9 
     10 printf "mime (e.g., video/audio/image): "
     11 read -r mime
     12 
     13 printf "%s" "+l" > "$NNN_PIPE"
     14 find . | file -if- | grep "$mime" | awk -F: '{printf "%s\0", $1}' > "$NNN_PIPE"