Re: shell scripting problems

2008-11-29 Thread perryh
In the shell script, i have a pkg_info -qLx ^$PKG-[0-9,._]+$ also tried (-X)tended regex instead of the standard rege(-x). sh keeps erroring out saying various $ isn't a valid variable name ... Both sh and csh will try to treat $ inside of as a variable reference. Does it work any

Re: shell scripting problems

2008-11-29 Thread George Davidovich
On Fri, Nov 28, 2008 at 11:31:17PM -0700, Tim Judd wrote: On Fri, Nov 28, 2008 at 11:08 PM, Sahil Tandon [EMAIL PROTECTED] wrote: Tim Judd [EMAIL PROTECTED] wrote: I am not sure what the problem is, but are you just looking for the output of pkg_info -qxL on the *first* instance of

Re: shell scripting problems

2008-11-29 Thread Mel
On Saturday 29 November 2008 05:58:44 Tim Judd wrote: In the shell script, i have a pkg_info -qLx ^$PKG-[0-9,._]+$ also tried (-X)tended regex instead of the standard rege(-x). pkg_info -qLx ^${PKG}-[0-9,\._]+\$ -- 1-- -2- @1: shell evaluates before regex. Use

Re: shell scripting problems

2008-11-29 Thread Sahil Tandon
Tim Judd [EMAIL PROTECTED] wrote: I'm sure it's faulty Which is why I'm asking for help My regexes (in it's various forms) produce the output similar to: xorg-fonts-75dpi xorg-fonts xorg-fonts-100dpi ... ... ... and I'm wanting my regex to return the 2nd value, in this

Re: shell scripting problems

2008-11-29 Thread Tim Judd
This seems to be the ticket. I'll be watching it but now I have an example on how to dual-quote a string. Thanks very much, Perry On Sat, Nov 29, 2008 at 1:37 AM, [EMAIL PROTECTED] wrote: In the shell script, i have a pkg_info -qLx ^$PKG-[0-9,._]+$ also tried (-X)tended regex instead

shell scripting problems

2008-11-28 Thread Tim Judd
Hi all, I've been trying for a few weeks to try to get this to work, and the /bin/sh keeps snagging the command line before passing it to pkg_info I'll use a different shell if I need to, but since I got everything except this one thing working, i'd rather keep it in sh In the shell script, i

Re: shell scripting problems

2008-11-28 Thread Sahil Tandon
Tim Judd [EMAIL PROTECTED] wrote: I've been trying for a few weeks to try to get this to work, and the /bin/sh keeps snagging the command line before passing it to pkg_info I'll use a different shell if I need to, but since I got everything except this one thing working, i'd rather keep it

Re: shell scripting problems

2008-11-28 Thread Tim Judd
I'm sure it's faulty Which is why I'm asking for help My regexes (in it's various forms) produce the output similar to: xorg-fonts-75dpi xorg-fonts xorg-fonts-100dpi ... ... ... and I'm wanting my regex to return the 2nd value, in this example, in this list. The problem is the