I need to delete the portion of a string after the "."For example:
test_file1.txt
must be translated into
test_file2
I have tried using "tr" command but it deletes every occurences of the string:
echo test_file1.txt | tr -d '.txt'
gives
es_file1
becouse it deletes all ".", all "t", all "x" and all "t"
Thanks for help.
test_file1.txt
must be translated into
test_file2
I have tried using "tr" command but it deletes every occurences of the string:
echo test_file1.txt | tr -d '.txt'
gives
es_file1
becouse it deletes all ".", all "t", all "x" and all "t"
Thanks for help.