rhnaeco
Technical User
- Aug 11, 2005
- 45
i know this may seem like an obvious question, but i am trying to create a blank text file from the command line (so that it doen't open), because i want to send continuous data into it from a loop ( i.e the first command is >> file.dat.
at the moment i am using :
$ echo > file.dat
which leaves a blank line at the beginning once data arrives.
i have tried just using >> to create the file but it produces an error for some of my input files so it seems easier to just make a blank file (which has a different name depending on the input data file).
I have also tried touch, but again i want to overwrite if the name exists.
thanks in advance
at the moment i am using :
$ echo > file.dat
which leaves a blank line at the beginning once data arrives.
i have tried just using >> to create the file but it produces an error for some of my input files so it seems easier to just make a blank file (which has a different name depending on the input data file).
I have also tried touch, but again i want to overwrite if the name exists.
thanks in advance