Sunday, 22 May 2011

Delete lines from file2 beginning with file1

A very simple script:
#!/bin/bash
while read WORD
do
cmd="$cmd -e /^$WORD,/d"
done < file1
sed $cmd < file2 > file3

Possibly Related Posts

No comments:

Post a Comment