I have the following command:
grep -owf champs.txt t.txt
and I want to cut the result of this command from the file
t.txt to another file.
I know that it can be achieved by a nested command but I do not know how to do it.
Note that in the file
t.txt, I have:
select * from student insert name age from professors delete from departement where DPTNUM= 20
and in the file
champs.txt I have:
select insert into values delete drop from create table where set varchar number
so the desired result for the first line is: