Ticket #3586: mc-3586-fix-wrong-lowercase-sed-syntax.patch

File mc-3586-fix-wrong-lowercase-sed-syntax.patch, 1.1 KB (added by and, 7 years ago)
  • misc/mcedit.menu.in

    From 335c5925d5400c9c5222aebbf3f33a941ab1a8a2 Mon Sep 17 00:00:00 2001
    From: Andreas Mohr <and@gmx.li>
    Date: Tue, 19 Jan 2016 17:00:24 +0000
    Subject: [PATCH] fix wrong lowercase sed syntax
    
    fix bug #3586 reported by rimf
    (plus minor tweak remove unneeded cat/pipe command)
    
    Signed-off-by: Andreas Mohr <and@gmx.li>
    ---
     misc/mcedit.menu.in | 4 ++--
     1 file changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/misc/mcedit.menu.in b/misc/mcedit.menu.in
    index e64e55f..e1aa510 100644
    a b o Open bash to next free console 
    471471u       Upper case selection 
    472472        TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 
    473473        cat %b > $TMPFILE 
    474         cat $TMPFILE| sed 's/\(.*\)/\U\1/' >%b 
     474        sed 's/\(.*\)/\U\1/' $TMPFILE >%b 
    475475        rm -f $TMPFILE 
    476476 
    477477l       Lower case selection 
    478478        TMPFILE=`mktemp ${MC_TMPDIR:-/tmp}/up.XXXXXX` || exit 1 
    479479        cat %b > $TMPFILE 
    480         cat $TMPFILE| sed 's/\(.*\)/\U\1/' >%b 
     480        sed 's/\(.*\)/\L\1/' $TMPFILE >%b 
    481481        rm -f $TMPFILE 
    482482 
    483483#-------------------------- End of common section -----------------------------