Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

30
  • 1
    I found your point about creating the file and then using I/O tools, very solid. Thank you. Commented Apr 10, 2014 at 12:10
  • 1
    @FaheemMitha Yes (>>). I was referring to the examples given by OP using >. Appending would be quite useless if what you are after is creating files (or NOOP out if they exist). Commented Apr 10, 2014 at 12:40
  • 1
    Don't forget that noclobber has not to be set so that > will overwrite an existing file. Commented Apr 10, 2014 at 13:23
  • 1
    @Ouki AFAIK, setting that is not default behaviour and one could forget that it's set on one system and not another, potentially leading to trouble in the same way that creating an alias rm='rm -i' instead of alias rmi='rm -i' is a bad idea. Commented Apr 10, 2014 at 16:31
  • 1
    @mikeserv, > .file, on a command line alone, will do that perfectly well without the :. Commented Apr 11, 2014 at 0:27