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...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.