From mboxrd@z Thu Jan 1 00:00:00 1970 From: Simon Gerber Subject: Need help with acpi event string splitting Date: Thu, 09 Sep 2004 19:55:56 +0200 Sender: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Return-path: Errors-To: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org List-Id: linux-acpi@vger.kernel.org Dear listreaders I have a minimal default.sh that used to configure what the acpi events do trigger. #!/bin/sh # Default acpi script that takes an entry for all actions set $* group=${1/\/*/} action=${1/*\//} My problem now is that I would like to extend those filter, but I don't know how. My event that I would like to parse looks like this: ibm/hotkey HKEY 00000080 00001003 I'd like to have a expression that returns the last for digit if the group corresponds to ibm and action to hotkey. hotkeynr=${???} I tried to write a pcre but I lack the knowledge or it's not a pcre that 's used here so if someone could point me it would be nice. Greetings Simon ------------------------------------------------------- This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170 Project Admins to receive an Apple iPod Mini FREE for your judgement on who ports your project to Linux PPC the best. Sponsored by IBM. Deadline: Sept. 13. Go here: http://sf.net/ppc_contest.php