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*

6
  • Watching for close_write events and using cat (without &) might be a better approach. Commented Feb 26, 2014 at 19:42
  • @Stephane I thought about that but then you will catch all files written to. You could do another inotify on the same file, but if it is closed too quick you won't get anything. Commented Feb 26, 2014 at 19:47
  • @Stephane, why the IFS=? I don't think that is necessary. Commented Feb 26, 2014 at 19:53
  • tail is not necessary in an answer, I added to my question to clarify Commented Feb 26, 2014 at 20:02
  • 2
    If white space characters (tab and space as in the default value of IFS) are in $IFS, then they'll be removed from the beginning and end of the line. If you want to read a line verbatim, you must always remove the whitespace characters from IFS, the easiest being to set IFS to the empty string. Commented Feb 26, 2014 at 20:07