This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
get_os_info() { | |
local desc=$(cat /etc/*-release | uniq) | |
local ver=$(echo $desc | sed 's/.* release \(\S*\) .*/\1/') | |
local arch=$(uname -m) | |
case $desc in | |
Red*) | |
local os=RHEL | |
;; | |
CentOS*) | |
local os=CentOS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
:: | |
:: logrotate.bat - Log rotation for windows | |
:: | |
:: Usage: logrotate.bat filename maxfilecount [maxfilesize] | |
:: | |
:: filename : The file name to rotate. | |
:: maxfilecount: Number of backup files. | |
:: maxfilesize : Rotated if the size of file exceeds specified size. | |
:: (Default is 0. Unit notation is available (K, M and G)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# カレントディレクトリのサブディレクトリサイズをMBでソートして表示 | |
printf "%'10d(MB)\t%s\n" $(du -ms * | sort -n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
COMPILER = g++ | |
CFLAGS = -g -MMD -MP -Wall -Wextra -Winit-self -Wno-missing-field-initializers | |
ifeq "$(shell getconf LONG_BIT)" "64" | |
LDFLAGS = | |
else | |
LDFLAGS = | |
endif | |
LIBS = | |
INCLUDE = -I./include | |
TARGET = ./bin/$(shell basename `readlink -f .`) |