I am using tcsh and got following problem.
Sometimes it is necessary to wait for a certain file to be written or
erased or wait for another event and execute a command afterwards. This
case happens quite often so I want to use the command line rather than
writing a shell script each time. Normally one would expect the
following line would do what I want:
tcsh# while (-f fileName);sleep 5;end;execute_command
But the shell asks:
If I am typing "end" now the while loop starts but the command
(execute_command) is executed each loop. I could not find a way to wait
for the event and execute the command afterwards by using the command
Using bash one can do this in the command line as expected. Another
possibility would be to write a small script for each case like the
while (-f fileName)
But I am looking for a way to this in command line not in a script.
Anyone who got an idea?