From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Message-ID: <429AA92B.6070704@aaanet.ru> Date: Mon, 30 May 2005 09:48:27 +0400 From: Igo User-Agent: Mozilla Thunderbird 0.6 (Windows/20040510) X-Accept-Language: ru-ru, ru MIME-Version: 1.0 To: community@altlinux.ru Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 8bit X-OriginalArrivalTime: 30 May 2005 05:48:30.0084 (UTC) FILETIME=[3510DC40:01C564DB] Subject: [Comm] awk X-BeenThere: community@altlinux.ru X-Mailman-Version: 2.1.5 Precedence: list Reply-To: community@altlinux.ru List-Id: Mailing list for ALT Linux users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 May 2005 05:48:31 -0000 Archived-At: List-Archive: List-Post: Привет всем как правильно объявить переменную и вывести результат? в таком виде print и cnt01840 ходят покругу #!/bin/bash gawk -F \| ' { cnt01840=0; if( $0 ~ /^\|/ && ($4==01 || $4==02 || $4==03)) { cnt01840++; ......... ......... } print(cnt01840); } ' reestr.txt >1