Re: [SLUG] ??sed

From: Levi Bard (levi@bard.sytes.net)
Date: Mon Sep 15 2003 - 15:31:12 EDT


> I have been trying to delete a line in a file using sed and although I
> have used sed in the past, this time I am stuck.
>
> I want to delete a line in a file if that line contains the value of the
> variable $name. I have tried sed '/$name/d' < inputfile > outfile
> without success. I have tried many variations on that theme also
> without success. Can someone help me with the syntax since my brain is
> obviously over taxes.

Double quotes. If you use single quotes, the variable $name doesn't get
expanded.
-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:30:19 EDT