Solve code issue - string identity testing

Posted by kovibb on Stack Overflow See other posts from Stack Overflow or by kovibb
Published on 2014-06-07T20:50:16Z Indexed on 2014/06/07 21:24 UTC
Read the original article Hit count: 189

Filed under:

Please for help with shell script. I really dont understand where is problem. Where I write to the Input variable for example /home/Kovi/Deskop/netlist.exe I still get true answer but the extension "exe" is not "scs". I also try "==" but it didnt working. Please some advice. Thank you very much.

echo -n "Insert Entire Path (with file name and it's extension) of Input Netlist > "
read Input
if [ "${Input##*.}"="scs" ];
    then echo "Patch verification is succesful.;
    else echo "Patch verification is failed, script was aborted. File dont exist or is empty or unreadable or is not spectre netlist."
         error_exit;
fi

© Stack Overflow or respective owner

Related posts about shell