Skip to main content
move answer out of code block.
Source Link
Tim Post
  • 685
  • 5
  • 17

Steps I took are in comments below:

 # rename old file regardless of how messes up or not # it is using basename to get information needed killfile="${pref}.${ext}" # copy old file name to a different file name # using the mv command # mv ${old file name.ext} ${oldfile name//search pattern/replace with] # gives you a new file with what ever you named it mv "$killfile" "${killfile//*/killme.k}" #the then just delete it rm "killme.k" #by doing it this way I found that the system will see it thus # it eliminated my file with out getting # no such file or directory error - that I was getting  

By doing it this way I, found that the system will see it thus it eliminated my file without getting the no such file or directory error - that I was getting.

 # rename old file regardless of how messes up or not # it is using basename to get information needed killfile="${pref}.${ext}" # copy old file name to a different file name # using the mv command # mv ${old file name.ext} ${oldfile name//search pattern/replace with] # gives you a new file with what ever you named it mv "$killfile" "${killfile//*/killme.k}" #the then just delete it rm "killme.k" #by doing it this way I found that the system will see it thus # it eliminated my file with out getting # no such file or directory error - that I was getting  

Steps I took are in comments below:

 # rename old file regardless of how messes up or not # it is using basename to get information needed killfile="${pref}.${ext}" # copy old file name to a different file name # using the mv command # mv ${old file name.ext} ${oldfile name//search pattern/replace with] # gives you a new file with what ever you named it mv "$killfile" "${killfile//*/killme.k}" #the then just delete it rm "killme.k" 

By doing it this way I, found that the system will see it thus it eliminated my file without getting the no such file or directory error - that I was getting.

Source Link
uxserx-bw
  • 536
  • 3
  • 7
  • 24

 # rename old file regardless of how messes up or not # it is using basename to get information needed killfile="${pref}.${ext}" # copy old file name to a different file name # using the mv command # mv ${old file name.ext} ${oldfile name//search pattern/replace with] # gives you a new file with what ever you named it mv "$killfile" "${killfile//*/killme.k}" #the then just delete it rm "killme.k" #by doing it this way I found that the system will see it thus # it eliminated my file with out getting # no such file or directory error - that I was getting