I want to split a file into multiple files. My input is
Report : 1 ABC DEF GHI JKL End of Report $ Report : 2 ABC DEF GHI JKL $ Report : 2 ABC DEF GHI JKL End of Report $ Report : 3 ABC DEF GHI JKL End of Report $ The output should be:
File 1
Report : 1 ABC DEF GHI JKL End of Report $ File 2
Report : 2 ABC DEF GHI JKL $ Report : 2 ABC DEF GHI JKL End of Report $ File 3
Report : 3 ABC DEF GHI JKL End of Report $ I have tried
awk '{print $0 "Report :"> "/tmp/File" NR}' RS="END OF" test.txt but I'm not getting appropriate output.
Any guidance would be appreciated.