[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: аналог утилиты file




20.01.2016 20:43, Alexander Galanin пишет:
> run-mailcap (и его специализации see, edit, view, compose, print)
> запускает соответствующую программу для каждого из четырёх действий на
> основании результата определения mime-типа файла

 % run-mailcap --action=view --debug file.hid
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/run-mailcap line
528.
 - parsing parameter "file.hid"
.............................................
 - extension "hid" maps to mime-type ""
 - file command returned mime-type "application/octet-stream"
 - Reading mailcap file "/home/slawa/.mailcap"...
 - Reading mailcap file "/etc/mailcap"...
..............................................
Processing file "file.hid" of type "application/octet-stream"
(encoding=none)...
Error: no "view" mailcap rules found for type "application/octet-stream"


 % see file.hid
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/see line 528.
Error: no "view" mailcap rules found for type "application/octet-stream"

 % edit file.hid
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/edit line 528.
Error: no "edit" mailcap rules found for type "application/octet-stream"

view открыло в редакторе vim в режиме только для чтения-одни
крякозябры... (открыло просто просмотрщик файла по умолчанию)

в пакете mime-support утилиты view нет:
% dpkg -L mime-support | grep view
/usr/lib/mime/debian-view


 % compose file.hid
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/compose line 528.
Error: no "compose" mailcap rules found for type "application/octet-stream"

 % /usr/bin/print file.hid
Unescaped left brace in regex is deprecated, passed through in regex;
marked by <-- HERE in m/%{ <-- HERE (.*?)}/ at /usr/bin/print line 528.
Error: no "print" mailcap rules found for type "application/octet-stream



-- 
BW,
Сохин Вячеслав


Reply to: