Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

bash string ends with

function f {
    if [[ "$1" == *.cpp ]]
    then echo "end with .cpp";
    else echo "this file isnt a cpp file"
    fi
}
 
PREVIOUS NEXT
Tagged: #bash #string #ends
ADD COMMENT
Topic
Name
5+1 =