Removing characters from file name
Good evening. I need to remove letters from filenames up to and including the "-":
there are a variable number of characters before the "-". The output should be:
I have tried to use sed
for file in *.txt;
sed 's/*-//g' $file >tempfile
mv tempfile $file
of course this did not work or I would not be here. I have tried several variations with no luck. I am sure it is because I do not understand the correct use of the wildcard in the sed command but I cannot find anything on this. All examples I have found remove a set number of charaters or deal with spaces.
Thanks for the time.