Reactive Programming and Coroutines › EpsonPrinter › JEdit마우스오른쪽메뉴에등록하기 › sonoff › classloader.jsp › delLastLine.sh
파일의 마지막 N라인을 삭제하여 출력
filename=$1 lineCountToDel=$2 lineCount=$(wc -l $filename | cut -d ' ' -f 1) ((target=lineCount-lineCountToDel+1)) sed ''${target},\$d'' ${filename}
사용법
./delLastLine.sh FILE_NAME LINE_CNT