Blog background
The author has always wanted to understand how to use the Print
command under Linux?
Direct Print hello. TXT
will report an error
Error: no "print" mailcap rules found for type "text/plain"
Specific operation
[email protected]:~/temp $ cat /etc/mailcap | egrep print
application/x-troff-man; /usr/bin/nroff -mandoc -Tutf8; copiousoutput; print=/usr/bin/nroff -mandoc -Tutf8 | print text/plain:-
text/troff; /usr/bin/nroff -mandoc -Tutf8; copiousoutput; print=/usr/bin/nroff -mandoc -Tutf8 | print text/plain:-
text/plain; view %s; edit=vim %s; compose=vim %s; test=test -x /usr/bin/vim; print=cat %s; needsterminal
application/x-tar; /bin/tar tvf '%s'; print=/bin/tar tvf - | print text/plain:-; copiousoutput
application/x-gtar; /bin/tar tvf '%s'; print=/bin/tar tvf - | print text/plain:-; copiousoutput
application/x-ustar; /bin/tar tvf '%s'; print=/bin/tar tvf - | print text/plain:-; copiousoutput
[email protected]:~/temp $ ls
hello hi.txt
[email protected]:~/temp $ cat hi.txt
hello
[email protected]:~/temp $ print hi.txt
hello
This is the situation after I edit the mailcap file. Pay attention to this line
text/plain; view %s; edit=vim %s; compose=vim %s; test=test -x /usr/bin/vim; print=cat %s; needsterminal
That is, just add a print command rule after text/plain, which is so simple.
Read More:
- docker-compose -version Run Error [How to Fix]
- The docker export container cannot be run after being imported: error response from daemon: no command specified
- The upgrade of Ubuntu results in an error in the compilation of Android Jack [Two Method to Solve]
- How to set fixed IP address for Raspberry Pie
- How to Solve Mujoco Install Error in Ubuntu (Pycharm Run Error)
- MAC Adb Shell Error: -bash: adb: command not found, adb
- Sublime text 3 compiles and executes C/C++ programs directly
- Ubuntu 20.04 Desktop Install sublime-text Error: “Certificate verification failed”
- [Solved] Nvml compilation official use case error: collect2: error: ld returned 1 exit status
- NXP mx8 Platform tensorflow-lite build error [How to Solve]
- [Solved] Shell error: syntax error: unexpected end of file
- linux Ubuntu Error: No command ‘setenv‘ found
- [Solved] Ubuntu Error: Error in the certificate verification
- Ubuntu Server: How to Install Chrome
- How to Solve Ubuntu “Failed to fetch” Error
- [Solved] ERROR: Command errored out with exit status 128: git clone -q
- [Solved] ffmpeg Error: fatal error: zlib.h: Not having that file or directory
- [Solved] Ubuntu Terminal Error: subprocess installed post-installation script returned error exit status 1
- [Solved] Linux — 9 — txt files are copied from windows to Linux and read error
- Shell Script syntax error near unexpected token `done’