This is my source.php file i want copy line number and line code if pattern matches between \'<(single quot less than) and \'>;(sinle quot greater than comma) <
sed -ne "/',/>'\;/{=;p}" source.php | sed '/./N;s/\n/ /' > wdestination.php
The = prints the line number of the pattern. The second sed command puts the line number on the same line as the text, otherwise it would be printed on separate lines.