File manipulation question
Hey everyone,
I have a script with a nested loop which upon each iteration outputs a file, call it output.bed
Before the loop ends, I would like to dump the contents of output.bed into another file, call it temp.bed, so that after each iteration, temp.bed fills up with an additional line of data. The data that is being output is simply a number. So, for example my temp.bed file should be something like:
1
2
3
4
5
Do you guys know a good command that will take the contents of one file and just dump it into another? I am trying things like:
echo $ROOTDIR/$OUTDIR/$COVERAGEFILE >> $ROOTDIR/$OUTDIR/NUMTAGS
but that is not dumping the contents of the file, rather it is dumping the directory:
./mm8-small-DATA/mm8-small-N.bed
./mm8-small-DATA/mm8-small-N.bed
./mm8-small-DATA/mm8-small-N.bed
./mm8-small-DATA/mm8-small-N.bed
./mm8-small-DATA/mm8-small-N.bed
instead of
1
2
3
4
5
Any help would be appreciated.
|