본문 바로가기 메뉴 바로가기

fendys

프로필사진
  • 글쓰기
  • 관리
  • 태그
  • 방명록
  • RSS

fendys

검색하기 폼
  • ALL fendys write (151)
    • AWS (21)
    • linux (93)
    • security (0)
    • ansible (13)
    • monitoring (2)
    • VM (0)
    • DB (4)
    • windows (4)
    • it (12)
    • 가상화폐 (0)
  • 방명록

특정 문구 치환 (1)
sed 활용

sed command를 통해서 아래 포함할문구1 또는 포함할문구2 가 있는 라인은 삭제 하고 /data/result/filename명으로 저장한다. #!/bin/bash for file in ls * do if [ -f $file ] then tmpfile="$file" mkdir -p /data/result wc -l $file >> /data/result/result.log sed -e '/{포함할문구1}\|{포함할문구2}/d' $file > /data/result/$tmpfile wc -l /data/result/$file >> /data/result/result.log fi done sed command를 통해서 아래 {team\\\":{\\\"number\\\":\\\"[0-9]\{16\}} 을..

linux 2024. 4. 5. 20:36
이전 1 다음
이전 다음
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
  • [여행] warmfree
  • [재미] wowns
TAG
  • nxos ansible
  • ILO
  • shell connmad log
  • kernel 변경
  • 윈도우서버 계정 관려
  • cmd로 윈도우 계정 관리
  • ansible ios
  • DL20 GEN9 장비에 CentOS 7
  • linux command log
  • 특정 문구 치환
  • ipmi
  • vm rac
  • windows.old 강제삭제
  • nutanix rac
  • dl20
  • CentOS 7 GUI
  • cmd로 계정 생성
  • ISCSI 볼륨 RAC
  • 리눅스 커맨드 로그남기기
  • 특정 라인삭제
  • dl20 g9 centos7 설치
  • chrony
  • dl20 centos7
  • 윈도우 cmd 계정 관리
  • ansible network
  • ios ansible
  • centos7 ntp
  • cisco ansible
  • oracle linux8 kernel
  • cgroup
more
«   2025/05   »
일 월 화 수 목 금 토
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
글 보관함

Blog is powered by Tistory / Designed by Tistory

티스토리툴바