I have a file named solution.txt . I need to check whether such file exist in current directory. if it exist, then removing that file and replacing it with (solution.txt)
Example: in my directory: wer.txt wer1.txt wer2.txt solution1.txt solution23.txt solution32.txt
i need to remove all the files starting with 'solution' ending with txt from the directory and replace it with solution.txt.
please give the shellscript solution .