[Sussex] Trouble with BASH scripting....

Richie Jarvis richie at helkit.com
Tue Feb 21 15:46:13 UTC 2006


John Crowhurst wrote:
> On Mon, February 20, 2006 20:30, Richie Jarvis said:
>   
>> But this falls flat on its face, and I cannot for the life of me work
>>     
> out why (been trying all afternoon!)
>   
>> execute sed -e "s:.FileHandler.pattern =.*:.FileHandler.pattern
>> =$INSTALL_DIR/logs/mvpdm.log:g" logging.properties.tmp >
>> logging.properties
>>     
>
> If you replace the space in .FileHandler.pattern =.*: with \s, and sed
> will match your query. Set the \s to \s* and it will match the query if
> the space is there or not.
>
>   
Cool - thanks John.

Now, another Q - how do I make it put spaces IN in the output?  \s 
doesn't work (it puts an 's' in) - I think half the problem is that I 
have the execute function doing the work, and it is stripping out the 
double-quotes when it is passed thru - any ideas how to stop this 
happening (putting \" doesn't do it, it then throws a wobbly!)

Cheers,

Richie

-- 
Richie Jarvis
Email: richie at helkit.com
Website: http://www.helkit.com
Phone: 0207 100 6879 or 3808676 at sipgate.co.uk





More information about the Sussex mailing list