<commit_before>#!/bin/sh
#
# Simple Redis init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.
#
# 简单的Redis启动、关闭脚本，工作在Linux系统上
# 因为它使用/proc文件系统

# 端口号、服务器和客户端的执行文件、进程ID文件、配置文件
REDISPORT=6379
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli

PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/${REDISPORT}.conf"

# 参数列表（start、stop）
case "$1" in
    start)
        if [ -f $PIDFILE ]
        then
                echo "$PIDFILE exists, process is already running or crashed"<commit_msg>[FIX] redis_init_script.sh - 将"端口号"作为一个可选参数传入<commit_after>#!/bin/sh
#
# Simple Redis init.d script conceived to work on Linux systems
# as it does use of the /proc filesystem.
#
# 简单的Redis启动、关闭脚本，工作在Linux系统上
# 因为它使用/proc文件系统
#
# 示例：
#   sudo sh redis_init_script.sh start 6379
#

REDISPORT=6379

# 读取"端口号"可选参数
if [ ! -z "$2" ] ; then
	REDISPORT=$2
	echo "Selected Port: $REDISPORT"
fi


# 服务器和客户端的执行文件、进程ID文件、配置文件
EXEC=/usr/local/bin/redis-server
CLIEXEC=/usr/local/bin/redis-cli

PIDFILE=/var/run/redis_${REDISPORT}.pid
CONF="/etc/redis/${REDISPORT}.conf"

# 参数列表（start、stop）
case "$1" in
    start)
        if [ -f $PIDFILE ]
        then
                echo "$PIDFILE exists, process is already running or crashed"
{'fraction_non_alphanumeric': 0.13291139240506328, 'fraction_numerical': 0.012658227848101266, 'mean_word_length': 3.5667870036101084, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3517349', 'n_tokens_mistral': 590, 'n_tokens_neox': 572, 'n_words': 108}