SUMMARY: sed variable substitution problem

From: utkarsh joshi <j_utkarsh_at_yahoo.com>
Date: Fri Feb 08 2002 - 10:53:19 EST
I got many responses in 5 minutes so far.t Many thanks
to Don Miles. His solutions worked.
Original Question:  
> > Hi managers,
> > I am writing a menu driver script to change
> monitoring
> > limit for file systems.But when the variable is
> > substituted it is treated as part of sed command.
> > e.g.
> > I want to delete line "/ 60 "from reference file.
> > where fs=/ and fslimit=60
> > I can't use sed -e "/\$fs/d" $file Or "/$fs/d"
> $file.
> > 
> > Thanks and I will summerise.
> > 
> > Utkarsh..

> I had this problem once but don't remember exactly
> how I solved it.
> I solved it by escaping the special characters and
> you may need more
> than one backslash to do it.  Try something like:
> 
>   sed -e "/\\$fs/d"
> 
> 
> Don Mies
Send FREE Valentine eCards with Yahoo! Greetings!
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers
Received on Fri Feb 8 09:54:15 2002

This archive was generated by hypermail 2.1.8 : Thu Mar 03 2016 - 06:42:33 EST