Mailing List ArchiveSupport open source code!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Shell scripting
- To: <tlug@example.com>
- Subject: Shell scripting
- From: Sven Simon <sven@example.com>
- Date: Sat, 26 May 2001 04:21:04 -0500 (CDT)
- Content-Type: TEXT/PLAIN; charset=US-ASCII
- Reply-To: tlug@example.com
- Resent-From: tlug@example.com
- Resent-Message-ID: <lTvKjD.A.fpG.DW3D7@example.com>
- Resent-Sender: tlug-request@example.com
I have a file X which lists filenames in the dir tree such as /etc/hosts or whatever and I have a file Y including a subset of the names listed in file X. Now, what I'd like to do is comment out all those lines in file X which show names included in file Y. I've tried to use sed with no success: for i in `cat $1`; do sed -e s/"$i"/"#$i"/ $2 done with $1 being file X and $2 being file Y I believe the problem is because of the forward slashes in the filenames Is there a way to make this work, could I use anything else than sed? SVEN
- Follow-Ups:
- Re: Shell scripting
- From: Sven Simon <sven@example.com>
Home | Main Index | Thread Index
- Prev by Date: Re: Linux drivers for Fujitsu TFT monitors
- Next by Date: Re: Shell scripting
- Prev by thread: Re: Linux drivers for Fujitsu TFT monitors
- Next by thread: Re: Shell scripting
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links