man 명령으로 man page를 읽으면, 위/아래 페이지 이동이나 검색하는 것이 불편하다.
차라리 text 파일을 열어서 검색하는 것이 앞/뒤 문맥을 확인하기 편하고, 전체 페이지 중에서 내가 어디쯤을 읽고 있는지 감을 잡기도 편하다.
그래서 이런 불편함을 해결하려고 man page를 text file로 dump하는 것을 만들었다.
| |
| |
| |
| |
| mandump() { |
| man $1 | col -bx > man_page_$1.txt |
| } |
위와 같이 .bashrc 파일에 명령 'mandump'를 추가하고, 아래와 같이 실행한다.
| $ mandump curl |
| |
| $ vi man_page_curl.txt |
| |
| curl(1) Curl Manual curl(1) |
| NAME |
| curl - transfer a URL |
| |
| SYNOPSIS |
| curl [options / URLs] |
| |
| DESCRIPTION |
| curl is a tool to transfer data from or to a server, using one of the |
| supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, |
| IMAPS, LDAP, LDAPS, POP3, POP3S, RTMP, RTSP, SCP, SFTP, SMB, SMBS, |
| SMTP, SMTPS, TELNET and TFTP). The command is designed to work without |
| user interaction. |
| ... |
| ... |