Mine
public shellscript v1 · immutablefunction removePlugin{ LINE=`cat $SERVER_PROPERTIES | grep "plugins="` _endstr="" values=$(echo $LINE | tr "," "\n") for _plugin in $values do if [[ $_plugin == plugins=* ]] then _plugin=${_plugin:8} fi if [[ $_plugin == $PLUGIN ]] then continue # we want to remove it fi if [[ $_endstr == "" ]] then _endstr="plugins=$_plugin" else _endstr="$_endstr,$_plugin" fi done echo $_endstr}