25개 이상의 토픽을 선택하실 수 없습니다.
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
- #!/bin/bash
- # Usage: nicegrep NICE MAXMEMORY ARG...
- # Executes grep with the provided arguments using `nice -n NICE` and `ulimit -v MAXMEMORY`
- nice="$1"; shift
- maxMemory="$1"; shift
- if [[ "${maxMemory}" != '0' ]]; then ulimit -v "${maxMemory}"; fi
- exec nice -n "${nice}" grep "$@"
|