Home > database >  removing CSV files once they are used using bash
removing CSV files once they are used using bash

Time:12-22

I am currently working on several transformations starting from a CSV file (file1.csv). Once the transformation is done, I export it to a new file (file2.csv). >file2.csv

I would like to remove then the first file (file1.csv) with bash code.

How can I do?

I could not find related information over here.

Thanks.

CodePudding user response:

Here's what you should really be doing:

cmd file1.csv > file2.csv && rm file1.csv

where cmd is whatever command you're running.

CodePudding user response:

I'm not sure, that i completely understand your question, because you should find plenty information about what you're describing.

Just use:

rm /some-directory/file2.csv
  • Related