title: Bash Regex rename files
body: <p>I have a bunch of files that are simply just a unix time.  The problem is that their filenames go to millis and the program that scans the directory expects them to be in seconds.  So I need to rename all the files to remove the last 3 digits before the .txt extension.  IE:</p>
  
  <p>1461758015598.txt --> 1461758015.txt</p>
  
  <p>I am new to regex and bash so I am not sure how to do this.</p>