"Adrian Borthwick" <22*5*5*
4@s*u*e*t*u*a*e*u*a*> wrote:
> Hello
> Just wondering for this assignment, is our script allowed to create a file?
> For example, save the output of command/s to a particular file, then use that file later on in the program. To avoid code duplication.
>
> I found that the output of a command is saved in a different format depending on whether it goes into a variable or a file, and that output is interpreted differently when the variable is reused eg. multiple lines i think get converted to an array? So was hoping we could use file/s if possible.
>
> Additionally wondering what kind of parameter and file validations /antibugging we would need to run, I'm guessing this will be covered over the next week/s? Are there any assumptions we can make, ie. the data file will always have those columns with those names in that order?
>
> Thanks
> Adrian :)
Hi Adrian,
Yes, the program can create temporary files. Just remember to tidy up afterwards. (I think I'm channeling my mother <grin>). Indeed, it often makes much more sense to do so.
Re what antibugging to do, I won't be listing it (some room for creativity here), but I will explain the concept next week and give typical examples.
That said, it is reasonable to assume that the format of the input file will not change, i.e. the series of columns and what they represent.
Cheers
MichaelW