2016-07-29 15 views

答えて

2

あなたはこれを達成するために二回のラインを読み取るためbashワードカウントツール、フラグをwcを使用することができます -

#!/bin/bash 

initial=$(wc -l < log)  # first capture of the number of lines 
sleep 5s     # Sleep for 5s 

later=$(wc -l < log)  # Second capture of the line count 

((later - initial)) && echo "Writing to log pending" || echo "Writing to log finished" 
+0

グレート!それは私の問題を解決します。 – brest1007

関連する問題