Dear michaelrozar17
Your solution works absolutely fine on command line but I have to use it in shell script.What are the changes required for that.Also I want little change in its behaviour , it should include both the strings in final output.Is it possible ?
It does not require any change to run in a shell script, just copy paste the sed or awk lines into a file and run. But remember to give full path name of the inputfile, its better coding.
$ cat print_patterns.ksh
#!/bin/ksh
echo "Printing between Patterns.."
sed '/First/,/Second/!d' /full/path/to/inputfile
$ chmod u+x print_patterns.ksh
$ ./print_patterns.ksh
Printing between Patterns..
"My First String "
Some_Other_String ....
Some_Other_String ....
Some_Other_String ....
"My Second String"
$