Hello
i have a file in directory which has some values like this
lets assume the file is $p
ttry_rtyy_trree
and i am using a file as an input as ($Y) in a shell once i start the shell it should read the file $p and $Y once those lines are matched in $Y i want to take a copy of that line and lines which are below 7 lines and put it in a output file ($Z)
$Y has this
ttry_rtyy_trree
66341251111
14567888888
12323434343
23232454544
2323234354
354545476767
67676767676676
9834587957457439
100192903203239
and my Output file after extracting should be exactly like this
ttry_rtyy_trree
66341251111
14567888888
12323434343
23232454544
2323234354
354545476767
Thanks!!