[Sussex] Trouble with BASH scripting....

John Crowhurst fyremoon at fyremoon.net
Mon Feb 20 22:21:56 UTC 2006


On Mon, February 20, 2006 22:09, Richie Jarvis said:
> Ok - i think I know what is going on here (and yes, I know its bad form
> to post a reply to yourself! ;) )

Well I've replied too :)

> I think its the space that is messing things up here.  Shoving it into
> the function seems to be removing the " from the line.  Escaping them
> doesn't seem to work either, so whats the solution to keeping them???
> Or, more accurately (seeing as I have tried escaping them!) whats the
> proper way to do this, with a space inside the search part of the
> pattern match??

To match a space (any whitespace character), use \s
To match one or more, use \s+
To match zero or more, use \s*

--
John




More information about the Sussex mailing list