본문 바로가기
반응형

프로...Linux43

[APT] 저장소(repository) 변경하기 [APT] 저장소(repository) 변경하기 사전 확인 : 버전에 따라 설정 화일이 다름. /etc/apt/sources.list/etc/apt/sources.list.d/official-package-repositories.list 변경 : archive.ubuntu.com => ftp.daumkakao.comsecurity.ubuntu.com => ftp.daumkakao.com 참고 : vi로 일괄 변경하기 :%s#archive.ubuntu.com#ftp.daumkakao.com#g:%s#security.ubuntu.com#ftp.daumkakao.com#g 2019. 3. 31.
[SHELL] bash/sh 스트링(String) 변수 작업 [SHELL] bash/sh 스트링(String) 변수 작업 SHELL 스크립트르 보다보면 변수안에서 치환하든지 각종 작업들을 수행하는 예를 많이 볼 수 있다.여러번 찾게 되어 이곳에 링크와 내요을 옮겨본다. 참고 링크> https://www.tldp.org/LDP/abs/html/string-manipulation.html 10.1. Manipulating StringsBash supports a surprising number of string manipulation operations. Unfortunately, these tools lack a unified focus. Some are a subset of parameter substitution, and others fall under the .. 2019. 3. 21.
[C] BackSlash 제거하기 [C] BackSlash 제거하기Switch CLI의 WORD에 BackSlash를 이용하여 공백을 처리하려고 하는데 생각처럼 안되어 아낼와 같은 코드로 구현하였다.참고> Switch에서 WORD / LINE의 차이WORD : 공백 없는 문자열LINE : 공백을 포함한 라인 끝까지의 문자열- WORD 다음에 계속 파라미터들을 입력할 필요가 있어서 아래와 같이 구현하였음.// Remove BackSlashchar* found = src_buff;while(found = strchr(found, '\\')) {memmove(found, found+1, strlen(found+1)+1/*NULL*/);}printf("%s\n", src_buff); % memmove를 사용하지 않으면 결과가 예상과 달라짐. 2019. 3. 18.
[Ubuntu] 자동 시작 프로그램 생성하기(/etc/init.d) [Ubuntu] 자동 시작 프로그램 생성하기(/etc/init.d)DDNS Client 프로그램을 설치하고 수행하려고 하니까리부팅이나 Network Restart에는 재시작을 해주어여 하는 필요성이 생겨서자동으로 실행 해주는 방식을 적용하기로 하고 아래 그 방법에 대해서 기술한다. [스크립트 작성] /etc/init.d/ddns-noip2 에 작성#! /bin/sh ### BEGIN INIT INFO# Provides: ddns-noip2 2019. 3. 17.
반응형