Entry
TSE: File: Filter: Linux: View: Man: How to view 'man' files using TSE?
Sep 19th, 2003 08:40
Knud van Eeden,
----------------------------------------------------------------------
--- Knud van Eeden --- 18 September 2003 - 04:18 pm ------------------
TSE: File: Operating system: Linux/UNIX: View: Man: How to view 'man'
files using TSE?
Steps: Overview:
1. -Create a man file in Linux
e.g. type some command using man in a Linux console,
then redirect its output to some text file:
man fstab >/home/myfilename.man
2. -Then transfer this file from Linux to Windows
(use e.g. ftp)
3. -Load your man file
e.g.
EditFile( 'myfilename.man' )
4. -Run this macro
--- cut here ---------------------------------------------------------
// library: file: filter: screen: filters the screeninformation
(removes the '^H' character), but does not change the file content
itself (adapted from macro written by author=Sammy Mitchell,
http://www.semware.com) [kn, ni, th, 18-09-2003 16:17:22]
proc DisplayHook()
integer n
string input[255], output[255], attrs[255]
input = GetText(CurrXOffset() + 1, CurrLineLen())
output = ""
attrs = ""
n = 1 - 1
REPEAT
n = n + 1
case input[n]
when chr(0x08)
IF input[n-1] == "_"
output = SubStr( output, 1, Length( output ) - 1 ) //
remove the last '_' character from the output string
ELSE
n = n + 1 // skip the current and next character
ENDIF
otherwise
output = output + input[n]
endcase
UNTIL n >= Length(input)
PutStrAttr(output, attrs, Query(TextAttr))
ClrEol()
end
<f11> UnHookDisplay()
<f12> HookDisplay(DisplayHook,,,)
--- cut here ---------------------------------------------------------
5. -Press <F11> and <F12>, and it will toggle between man output and
readable text on the TSE screen.
---
Internet: see also:
How to change 'man' files to readable text files using TSE?
http://www.faqts.com/knowledge_base/view.phtml/aid/24463/fid/1220
VMWare: Linux: File: Transfer: Ftp: How transfer text information
generated by programs to Windows?
http://www.faqts.com/knowledge_base/view.phtml/aid/24415/fid/1144
Linux: Ftp: How to transfer files from Microsoft Windows to Linux,
using ftp? [VMWare]
http://www.faqts.com/knowledge_base/view.phtml/aid/23670/fid/445
Linux: Help: Command line: How to get help about a command? [man /
apropos / info / whatis]
http://www.faqts.com/knowledge_base/view.phtml/aid/24496/fid/107
----------------------------------------------------------------------