#!/bin/bash sed '/stone/ q' file2.txt cat file1.txt awk '/stone/{f=1;next}f' file2.txt