Deleteing Original File After Creating Another Here is the Script I have so far:

#! /bin/bash

dd=$(date -v -1d '+%Y-%m-%d')
for file in *.csv ; do
    saveName="${dd} - TF.csv"
    cut -d',' -f5,8 "$file" &gt; "$saveName"   
done


The file above would output 2014-02-09 - TF.csv and the file that created the file is Campaigns stats for period from Feb 9, 2014 to Feb 9, 2014 I'm trying to delete Campaigns stats for period from Feb 9, 2014 to Feb 9, 2014 how do I delete this with the script above after it creates 2014-02-09 - TF.csv
cut -d',' -f5,8 "$file" &gt; "$saveName" &amp;&amp; rm "$file"


Using &amp;&amp; (the shell 'and' operator) instead of ; as the command separator means that the rm command is only executed if the cut command succeeds.