
Command Line Tricks for Data Scientists - kawera
https://medium.com/@kadek/command-line-tricks-for-data-scientists-c98e0abe5da
======
__1a
> To add file extensions, you’ll need to run the following find command.

> It will change the names of ALL files within the current directory by
> appending .csv, so be careful.

> find . -type f -exec mv '{}' '{}'.csv \;

Could use instead:

    
    
      find . -name 'new_filname*' -exec mv '{}' '{}'.csv \;
    

Although simpler would be using:

    
    
      split -l 500 filename.csv --additional-suffix=.cvs
    

Also the suffix supplied to sed's in-place is optional

    
    
      sed -i '' 's/\$//g' data.txt 
      sed -i    's/\$//g' data.txt # same as above

