Make program first read from pipe, then from keyboard

Consider the interactive program interactive. I have to run this program fairly frequently, and each time I run it the first few commands are the same. Obviously, having to type those commands over and over again is a pain. I have collected those command (separated by newlines) in the file cmd. Now I can do cat cmd | interactive to run the commands. The problem is that once cmd has been fully read, interactive recieves EOF and exits.

Read log file between two dates

I have to read log file between and my question is how to get only the text in the file wich is between two dates using unix commands?
Every line contain date and I want to get the text in the file which dates are equal or bigger that the FROM date and lower or equal than the TO date.
The format of the date is 13/05/23 01:58.
The second date is for an example 13/05/13 07:50.
Example

What is the difference between > and >> (especially as it relates to use with the cat program)?

Suppose that I have a file called temp.txt. Using the cat program, I would like to add the contents of this file to the end of myfile.txt — creating myfile.txt if it does not exist and appending to it if it does. I am considering these possibilities: cat temp.txt > myfile.txt or cat temp.txt >> … Read more