Unix Programming - Re: variable not in sed not getting interpolated (was: variable in sed not getting int

This is Interesting: Free IT Magazines  
Home > Archive > Unix Programming > April 2006 > Re: variable not in sed not getting interpolated (was: variable in sed not getting int





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Re: variable not in sed not getting interpolated (was: variable in sed not getting int
Chris F.A. Johnson

2006-04-11, 9:59 am

On 2006-04-03, onlineviewer wrote:
> posted wrong line:
>
> DATE=`date +%b\ %d`
> sed -n '/$DATE/p' LOGGER.log > Mar30.log


How many times have you been told that variables are not expanded
inside single quotes?

--
Chris F.A. Johnson, author | <http://cfaj.freeshell.org>
Shell Scripting Recipes: | My code in this post, if any,
A Problem-Solution Approach | is released under the
2005, Apress | GNU General Public Licence
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com