icatalan
icatalan

Reputation: 165

removing CSV files once they are used using bash

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.

Upvotes: 0

Views: 262

Answers (2)

eDonkey
eDonkey

Reputation: 697

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

Upvotes: 1

Ed Morton
Ed Morton

Reputation: 203189

Here's what you should really be doing:

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

where cmd is whatever command you're running.

Upvotes: 2

Related Questions