发布网友 发布时间:2022-04-23 06:04
共1个回答
热心网友 时间:2022-05-14 04:29
展开1全部[root@* ~]# cat test.sh
#!/bin/sh
cat b.txt | while read line
do
{
cat a.txt | while read aline
do
{
echo "$aline" | grep "$line" >> c.txt
}
done
}
done
[root@* ~]# ./test.sh
[root@* ~]# cat c.txt
1|c1
1|d1
1|a1