I have a script which creates a certain text file.
Whenever I call it, I need to recreate this file, because I have no need in the previous content.
So I thought to remove the file every time I call the script, and that way I am sure that the previous content will not interrupt me.
I wrote this:
#!/usr/local/bin/tcsh -f
rm file1
rm file2
but then I get this error:
Is there anything else I could do, perhaps there's a command which only clears the file? Or will it print the same error?
Perhaps some of you will think that it prints this error in the times that I call the script in the first time, but sometimes it works and sometimes it doesn't.