unix가 command 찾는 순서1. alias2. built-in or keyword3. $PATH : 출력되는 경로 순부터 커맨드를 찾는다. short circuit. 경로 맨 뒤에는 현재 디렉토리 . 도 포함되어 있는 것을 확인할 수 있다. type, ls, cd 등의 파일을 현재디렉토리에 생성하고 실행하려해도 short circuit 때문에 작동하지 않는다.이 세 순서로 찾은 뒤 없으면 command not found 라고 뜬다.참고 : $변수 입력 뒤 캐리지리턴시 substitution이 일어나 echo 커맨드를 발생. 또다른 예는 rm *. 오래된 유닉스 시스템 사용 시, 파일이 너무많을경우 rm * 수행시 command too long 에러를 터미널 화면에 리턴함. Shell Script는..
groups Every user on an HP-UX ystem is assigned a primary group membership and up to 20 additional group membership # id user1uid=301 (user1) gid=301(class)#groups user1class class2 users HP-UX PAssword Mechanism1 전통적 pw (default)2 shadow pw3 trusted system /tch/* /etc/passwd FileUsername :보통 8자, 그 이상도 가능하긴하지만 그 이상일 경우 명령어 사용시 짤림.passwd 길이 : 8자#passwd -l user1 //로그인할 수 없음User ID, Group ID : 0 fo..
Arithmetic Evaluation Using let $ x=10$ x=x+1$ echo $xx+1 $ x=10$ let x=x+1 //let command enables shell scripts to use arithmetic expressions$ echo $x11$ (( x=x+1 ))$ echo $x12 $ x=12$ (( x>10 ))$ echo $?0 $ (( x> file.names echo "Continue?" echo enter yes or no read ansdone $ vi sum_them"sum_them" 10 lines, 139 charactersx=1sum=0while (( x > file.names echo "Continue?" echo enter yes or no read..
Return CodesThe shell variable ? holds the return code of the last command executed{$ echo $?1$ adfsh: adf: not found.$ echot $?sh: echot: not found.$ echo $?127$ false$ echo $?1$ echo $?} test commandtest command can evaluate the condition of Integers, Strings, Files [조심! 실습파일은 test 말고 test.sh 등으로 작성, sh는 쉘을 의미]test - Numeric Test-lt, -le, -gt, -ge, -eq, -ne (less, less or equal, greater, great..
shell programming$ cat a.cmain(){ for(;;);} //needs compile, not a shell script $ cat myprog# this is the program myprogdatels -F //shell script shell script and child process $ color=blue$ cat color1echo You are now running program: color1echo the value of the variable color is: $color$ color1You are now running program: color1the value of the variable color is:$ export color //환경변수화$ color1You..
A UNIX "process" is an instance of a running programListing Process : ps, top{$ topSystem: vm189 Thu Jun 22 17:28:09 2017Load averages: 2.54, 2.72, 3.67214 processes: 149 sleeping, 65 runningCpu states:CPU LOAD USER NICE SYS IDLE BLOCK SWAIT INTR SSYS 0 2.66 0.2% 99.2% 0.6% 0.0% 0.0% 0.0% 0.0% 0.0% 1 2.41 1.8% 96.4% 1.8% 0.0% 0.0% 0.0% 0.0% 0.0%--- ---- ----- ----- ----- ----- ----- ----- ----- ..
PipelinesThe | symbol is used for linking two commands together. A | B | C [commands B must be filter]{$ who | wc -l14$ who | dateThu Jun 22 12:12:12 KST 2017$ ps -ef | more$ ls | sort -r | more$ ps -ef | grep telnetd$ ps -ef | grep telnetd | wc -l} Pipelines versus Input and Output Redirectionwho > sort.out, sort stdin..
Input and Output Redirection Introducestdin : 표준입력 0 (file descriptor)stdout : 표준출력 1stderr : 표준오류 2 Input Redirection (create, overwrite) , >>(create, append)$ date > date.out$ cat date.outThu Jun 22 10:23:14 KST 2017 $ id > date.out$ cat date.outuid=311(user11) gid=301(class) groups=302(class2)$ cat date.outuid=311(user11) gid=301(class) groups=302(class2)Thu Jun 22 10:25:30 KST 2017 $ cat > c..
Quoting Introduce Many characters have 'special' meaning to the shell : white space, carriage return, $, #, *, Quoting removes the special meaning of the special characters:eg) rm='rm -i', MYNAME="YO HAN" Quoting - back slash (\)$ color=red\ white\ and bluesh: blue: not found.$ color=red\ white\ and\ blue$ echo $colorred white and blue$ echo one two \ //carriage return >one two Quoting - ' , ..
? : Matches any single character except a leading dot ( ?, except dot, .?, include hidden file)[ ] : a class of characters from which one will be matched{$ echo [abc]??$ echo [1-9][A-Z]$ echo [!A-Z]??}- :! :* : Matches zero or more characters except a leading dot ( ?, except dot, .?, include hidden file){$ echo .*$ echo *.dat contain only five character : echo ?????contain at least five characte..
- Total
- Today
- Yesterday
- 그라파나
- 항해99
- paul wilton
- 명제논리
- rosen
- beginning javascript
- Propositional and Predicate Logic
- 데이터 중심 애플리케이션 설계
- 가상 면접 사례로 배우는 대규모 시스템 설계 기초
- 자바스크립트 예제
- Discrete Mathematics
- arena simulation
- 이산수학
- 최단경로 알고리즘
- javascript
- Simulation
- 엄청난 인내심과 시뮬레이션을 위한 아레나 툴
- 이산 수학
- 시뮬레이션
- 로젠
- Arena
- 아레나 시뮬레이션
- Trie
- grafana cloud
- 아레나
- 대규모 시스템 설계 기초
- 자바스크립트
- 백준
- 아레나시뮬레이션
- flutter
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 | 29 | 30 | 31 |