GithubHelp home page GithubHelp logo

sysp_3-1's Introduction

SysP_3-1

16To2

설명

  • 무한으로 N 비트의 16진수를 입력받아 N*4 비트의 2진수로 전환시킴
  • N비트만큼 입력해야 함
  • "q"를 입력시 quit

EX

4비트의 16진수를 16비트의 2진수로 전환

  1. 0001 -> 0000000000000001
  2. 00A3 -> 0000000010100011
  3. FFFF -> 1111111111111111

작동 원리

  1. 16진수를 비트연산자인 ">>"을 통해 옆으로 한개씩 옮김
  2. mask field인 "1"에 비트연산자인 "&"를 통해 계산

결과 화면

image





리눅스 명령어 구현

파일명 작명 패턴 : my"리눅스 명령어".c

mynl.c (5개)

  • nl은 "number lines"의 약어
  • 텍스트 파일의 각 행에 번호를 할당하여 출력하는데 사용
  • 이를 통해 파일의 행을 쉽게 추적하고 텍스트의 특정 부분을 참조 가능

option

  • w : 행 번호의 너비를 지정할 수 있습니다. default = 6

  • s : 행 번호와 텍스트 사이의 구분 기호를 지정할 수 있습니다. default = 탭(\t)

  • v : 시작하는 행 번호를 지정합니다. default = 1

  • i : 행 번호의 증가 값을 지정합니다. default = 1

  • w, s, v, i : ./mynl -w 10 -s ".n" -v 10 -i 5 test.txt


myhead.c (4개)

  • 텍스트 파일의 앞부분을 출력하는 데 사용

  • 출력할 줄 수 default = 10

option

  • n : 출력할 줄의 수를 지정합니다.

  • c : 출력할 바이트 수를 지정합니다.

  • q : 파일 이름을 표시하지 않습니다. (파일 2개이상 읽을 시)


mytail.c (4개)

  • 파일의 끝 부분을 출력하는 명령어

  • 로그 파일이나 다른 텍스트 파일의 마지막 몇 줄을 확인하는 데 사용

  • 출력할 줄 수 default = 10

option

  • n : 출력할 줄의 수를 지정합니다.

  • c : 출력할 바이트 수를 지정합니다.

  • q : 파일 이름을 표시하지 않습니다. (파일 2개이상 읽을 시)


mycat.c (7개)

  • "concatenate"의 줄임말

  • 파일의 내용을 화면에 출력하거나 여러 파일을 결합하는 데 사용되는 명령어

option

  • n : 각 줄에 번호를 붙여서 출력합니다.

  • b : -n 옵션과 유사하지만, 빈 줄에는 번호를 붙이지 않습니다.

  • E : 각 줄의 끝에 $ 기호를 추가하여 출력합니다.

  • T : 탭 문자를 ^I로 대체하여 출력합니다.

  • v : 제어 문자를 가진 줄을 확장하여 출력합니다.

  • s : 연속된 빈 줄을 하나의 빈 줄로 압축하여 출력합니다.


myclear.c (1개)

  • 터미널 화면을 지우는 명령어


mybasename.c (1개)

  • 주어진 경로에서 마지막 경로만 추출하는 명령어


myyes.c (1개)

  • 뒤에 들어오는 인자를 계속 출력

  • 인자 default = 'y'

    • yes SysP
    • ./myyes SysP

mytrue.c (1개)

  • 0을 return해줌

  • echo $? return 값 또는 전 명령어의 성공 여부를 출력 (성공시 0, 오류시 1)


myfalse.c (1개)

  • 1을 return해줌

  • echo $? return 값 또는 전 명령어의 성공 여부를 출력 (성공시 0, 오류시 1)


myrev.c (1개)

  • 파일을 받고 파일 내용을 역순으로 출력


mydate.c (1개)

  • 현재 시간을 출력


myhostname.c (1개)

  • 현재 호스트 이름을 출력


myecho.c (1개)

  • 주어진 텍스트나 변수의 값을 출력하는 간단한 방법으로 사용


mypwd.c (1개)

  • 현재 위치 출력

sysp_3-1's People

Contributors

alscjf1329 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.