How To Write Infinite Loop in Bash �����Ŗ������[�v�����������@��bash��
This is how you create an infinite loop in bash to run a piece of code perpetually at pre-defined intervals.����́A�������[�v���쐬�����@�ɂ��Ă�bash�̍�i�̃R�[�h�����s����ɂ͎��O�ɒ�`���ꂽ�Ԋu�Ő₦�ԂȂ��B
#!/bin/bash while [ 1 ] do # Your code goes here # Modify sleep time (in seconds) as needed below sleep 2 done �� �I / bin / bash���Ȃ���[ 1 ]�́� ����ύX���ăR�[�h�������ɐ������ԁi�b�P�ʁj �A�K�v�ɉ����Ĉȉ��̐���2���� For example I used this code to write a bash script to�Ⴆ�A���A���̃R�[�h���������߂Ɏg�p�����bash�X�N���v�g�� monitor long running mysql queries MySQL�̃N�G�������s���ă��j�^�̒��� .�ł��B
Filed under��o����� How To�ǂ̂悤�� , �A Linux���i�b�N�X , �A Open Source Software�I�[�v���\�[�X�̃\�t�g�E�F�A , �A Programming�v���O���~���O , �A Tech Note�Z�p�̃m�[�g | |
| |
RSS 2.0 RSS 2.0�� | |
Trackback�g���b�N�o�b�N this Article |���̋L��|
Email this Article�d�q���[�����̋L��
You may also like to read��ǂނ悤�ɂ��邱�Ƃ��\ |





































June 2nd, 2008 at 10:18 am 2008�N6��2���10:18��
thanks !���肪�Ƃ��I
June 8th, 2008 at 9:28 pm 2008�N6��8��9:28 pm��
Thanks, worked great.���肪�Ƃ��A�����f���炵���ł��B