From: Silvio Rhatto Date: Sat, 16 Jun 2018 12:51:11 +0000 (-0300) Subject: Delete top_panel_size config and the following blank line at mc config X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=4c6259e12abb40d5bc60424ea8eea5e49c4e5615;p=wrappers.git Delete top_panel_size config and the following blank line at mc config --- diff --git a/mc b/mc index 96ec17c..228abc5 100755 --- a/mc +++ b/mc @@ -41,5 +41,17 @@ fi # # If $INI is a link, $CONF will be the link destination. # That's important because `sed -i` usually breaks the linking. -sed -i '/^left_panel_size=.*$/d' $CONF -sed -i '/^top_panel_size=.*$/d' $CONF + +# Delete left_panel_size config +if grep -q "^left_panel_size=.*$" $CONF; then + #sed -i '/^left_panel_size=.*$/,+1 d' $CONF + sed -i '/^left_panel_size=.*$/ d' $CONF +fi + +# Delete top_panel_size config and the following blank line +if grep -q "^top_panel_size=.*$" $CONF; then + sed -i '/^top_panel_size=.*$/,+1 d' $CONF +fi + +# Delete all empty lines from config +#sed -i '/^$/d' $CONF