Linux -Blue forest free software | Return to home page | Site Map | Search WWW | Contact Us |
Your current position : Homepage > Free Software > Technological exchanges >Application Programming


    

Blue Forest http://www.lslnet.com at 11:18 on June 26, 2006


Bjgirl few questions to ask? Thank you

First,
N one of the final shows how recycling firms
Secondly,
Starting at the specified time in a one-hour operation procedures do not crontab, only shell
Thirdly,
How real-time monitoring of a certain document, the contents have appeared to return to the information

Want to detail, I would like to thank first!

Bjgirl few questions to ask? Thank you

1, [code]while true;do tail -nN file;done[/code]
2,3, and while+sleep to achieve, the more general problem : oops :

Bjgirl few questions to ask? Thank you

1. Tail-f file -n20

Bjgirl few questions to ask? Thank you

Second, such as the daily operation of the shell at 5:00 to complete the function of the shell can cycle time to judge whether the current system at 5:00
Thirdly, such as a text document, he was uncertain when the shell operation, check text documents, which emerged as "operational error" and so on the specified information, shell is a piece of information given to the export terminal.

I wonder if there is clear, thank you

Bjgirl few questions to ask? Thank you

-->
[code]
Time= "5:00"
While true;do
[[($ Date +%k:%M) -eq $Time Says sleep, named cmd | | N
Done[/code]
-->
[code]while True;do
Grep-q "operational error", named echo text messages sleep N | |
Done[/code]
Thinking so broadly, the code without tests. : Oops :

Bjgirl few questions to ask? Thank you

Very grateful that a problem is a cycle running in the background but I should warn that the end can kill, but when the cycle of nest kill but I should warn ineffective
For example :
Trap "kill Private consumption expenditure" 1 2 15
While [1]
Do
Show menu. . .
Read choice
$choice In case
1) .......
2) (while [1]
Do
Tail -n10 abcd.txt
Done) &
Read key
Private consumption expenditure kill
Esac
Done
Cycle that can kill the background, what is the reason?

Bjgirl few questions to ask? Thank you

[code]
While true;do
Grep-q "operational error", named echo text messages sleep N | |
Done

[/code]

I think this solution is slow if the file is big.

Make a named pipe is a good idea.
Your script read the pipe, check string and write to the real file.

Bjgirl few questions to ask? Thank you

Ding



 Privacy Policy  Copyright © 1999-2000 LSLNET.COM. All rights reserved. Blue Forest website owners. E-mail : Webmaster@lslnet.com