From 99c29531f39d37a43893ccac7f7c8de390f71b8f Mon Sep 17 00:00:00 2001 From: UltimateByte Date: Mon, 16 Jan 2017 22:30:01 +0100 Subject: [PATCH] replace with sed again --- lgsm/functions/mods_core.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lgsm/functions/mods_core.sh b/lgsm/functions/mods_core.sh index 796567109..e3028f7db 100644 --- a/lgsm/functions/mods_core.sh +++ b/lgsm/functions/mods_core.sh @@ -185,7 +185,7 @@ fn_mod_add_list(){ fn_script_log "Created ${modslockfilefullpath}" fi # Input mod name to lockfile - if [ ! -n "$(cat "${modslockfilefullpath}" | grep "${modcommand}")" ]; then + if [ ! -n "$(sed -n "/^${modcommand}$/p" "${modslockfilefullpath}")" ]; then echo "${modcommand}" >> "${modslockfilefullpath}" fn_script_log "${modcommand} added to ${modslockfile}" fi