console
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
양쪽 이전 판이전 판다음 판 | 이전 판 | ||
console [2016/08/30 17:50] – rex8312 | console [2024/03/23 02:38] (현재) – 바깥 편집 127.0.0.1 | ||
---|---|---|---|
줄 1: | 줄 1: | ||
====== Console 도구 ====== | ====== Console 도구 ====== | ||
+ | |||
+ | 동일한 명령(nvidia-smi) 계속 반복하기 | ||
+ | |||
+ | while [ true ]; do nvidia-smi; sleep 1; clear; done | ||
+ | # 또는 | ||
+ | watch --interval=1 nvidia-smi | ||
+ | |||
+ | 파일 검색 | ||
+ | |||
+ | find {path} -name {filename} | ||
+ | find /usr -name libcudnn.so | ||
+ | |||
+ | 문서 꺼꾸로 출력 | ||
+ | |||
+ | tac a.txt > b.txt | ||
+ | # tac script.sh | bash # 꺼꾸로 실행 | ||
+ | | ||
+ | 문서 내용 무작위 출력 | ||
+ | |||
+ | cat a.txt | shuf | ||
+ | # tac script.sh | shuf | bash # 무작위 실행 | ||
+ | | ||
+ | 문서 내용 필터링 | ||
+ | |||
+ | cat a.txt | grep {pattern} | ||
+ | # tac script.sh | grep {pattern} | bash # 패턴에 맞는 명령 실행 | ||
+ | | ||
+ | 명령 반복 | ||
+ | |||
+ | for i in {1..5}; do echo ' | ||
문자열 출력 | 문자열 출력 | ||
줄 31: | 줄 61: | ||
curl {address} [-silent] | curl {address} [-silent] | ||
| | ||
- | unicode | + | 웹에서 스크립트 받아서 실행 |
+ | |||
+ | curl --silent --location {address} | bash - | ||
+ | |||
+ | PIPE 통해서 파일 열기(script 파일을 열기) | ||
+ | |||
+ | vi $(which script.py) | ||
+ | |||
+ | Console widget | ||
+ | |||
+ | * curses | ||
+ | * ncurses | ||
+ | * asciimatics | ||
+ | * npyscreen | ||
+ | |||
+ | ===== Visualization ===== | ||
+ | |||
+ | * [[plotille: | ||
+ | * [[sparkline]] | ||
+ | * [[ascii_plot]] | ||
+ | |||
+ | ===== Image view ===== | ||
- | https:// | + | * ascii image |
- | http:// | + | * apt install aview |
+ | * inline image | ||
+ | * w3m-img | ||
- | <code python> | + | ===== Windows ===== |
- | # -*- coding: utf -*- | + | |
- | import re | + | * key press |
- | try: raw_input | + | * https://github.com/kcsaff/getkey |
- | except: raw_input = input | + | |
- | + | ||
- | # Unicode: 9601, 9602, 9603, 9604, 9605, 9606, 9607, 9608 | + | |
- | try: bar = u' | + | |
- | except: bar = ' | + | |
- | barcount = len(bar) - 1 | + | |
- | while True: | + | |
- | line = raw_input(' | + | |
- | numbers = [float(n) for n in re.split(r' | + | |
- | mn, mx = min(numbers), | + | |
- | extent = mx - mn | + | |
- | sparkline = '' | + | |
- | for n in numbers) | + | |
- | print(' | + | |
- | print(sparkline) | + | |
- | </code> | + |
console.1472579446.txt.gz · 마지막으로 수정됨: 2024/03/23 02:37 (바깥 편집)