티스토리 뷰
Input and Output Redirection Introduce
stdin : 표준입력 0 (file descriptor)
stdout : 표준출력 1
stderr : 표준오류 2
Input Redirection <
$ mail user11 < color5
.....
<color5 contents>
....
$ cat < "filename" equivalent $ cat "filename"
Output Redirection >(create, overwrite) , >>(create, append)
$ date > date.out
$ cat date.out
Thu Jun 22 10:23:14 KST 2017
$ bdf >> diskusage
$ date >> diskusage
$ bdf >> diskusage
$ date >> diskusage
$ cat diskusage
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 235624 806624 23% /
/dev/vg00/lvol1 1835008 188960 1633272 10% /stand
...
/dev/vg00/lvol4 1179648 51384 1119464 4% /home
Thu Jun 22 10:28:01 KST 2017
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 1048576 235624 806624 23% /
/dev/vg00/lvol1 1835008 188960 1633272 10% /stand
/dev/vg00/lvol8 4587520 460424 4102440 10% /var
...
/dev/vg00/lvol5 10723328 5690896 4993184 53% /opt
/dev/vg00/lvol4 1179648 51408 1119440 4% /home
Thu Jun 22 10:28:23 KST 2017
Error Redirection 2>, 2>> (with file descriptor number)
$ cp 2> cp.err
$ cat cp.err
Usage: cp [-f|-i] [-p] [-S] [-e warn|force|ignore] source_file target_file
cp [-f|-i] [-p] [-S] [-e warn|force|ignore] source_file ... target_directory
cp [-f|-i] [-p] [-S] -R|-r [-e warn|force|ignore] source_directory ... target_directory
cp -R[-H | -L | -P] [-f|-i] [-p] [-S] [-e warn|force|ignore] source_file ... target
cp -r[-H | -L | -P] [-f|-i] [-p] [-S] [-e warn|force|ignore] source_file ... target
What is a Filter?
Reads standard input and produces standard output
wc - Word count ( -l,w,c)
$ wc
Have a good time
1 4 17
$ ps -e > ps.out
$ wc -l ps.out
202 ps.out
$ wc -l $(ls nam*)
9 names
9 names.cp
9 names.orig
27 total
$ cat names
jupiter
venus
pluto
mercury
saturn
earth
uranus
mars
neptune
$ grep root /etc/passwd
root:9oTPronwCKT9w:0:3::/root:/sbin/sh
'IoT 과정' 카테고리의 다른 글
HPUX - Process Control (0) | 2017.06.22 |
---|---|
HPUX - Pipes (0) | 2017.06.22 |
HPUX - Quoting (0) | 2017.06.21 |
HPUX - File Name Generation (0) | 2017.06.21 |
HPUX - Shell Advanced Features (0) | 2017.06.21 |
- Total
- Today
- Yesterday
- 대규모 시스템 설계 기초
- Propositional and Predicate Logic
- grafana cloud
- Discrete Mathematics
- javascript
- beginning javascript
- 데이터 중심 애플리케이션 설계
- Simulation
- 로젠
- 자바스크립트
- Grafana
- 백준
- Arena
- 아레나시뮬레이션
- 명제논리
- 이산수학
- paul wilton
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- 시뮬레이션
- 최단경로 알고리즘
- 아레나 시뮬레이션
- 아레나
- 항해99
- 자바스크립트 예제
- flutter
- 엄청난 인내심과 시뮬레이션을 위한 아레나 툴
- arena simulation
- 그라파나
- 이산 수학
- rosen
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |