I am somewhat of a novice at unix scripting and I need a little help. Here is what im trying to do:
I am trying to figure out how to pipe the following grep results into a file.
/source/programs: grep "WSBL020" W*
WBMB991.cbl: COPY WSBL020.
WDCB003.cbl: COPY WSBL020.
WDCB004.cbl: COPY WSBL020.
WOVB020.cbl:000926 COPY WSBL020
I only want the first 7 characters of each line of results preceeded by "compile". What I want is a file that looks like the following:
compile WBMB991
compile WDCB003
compile WDCB004
compile WOVB020
I have a copybook that has changed and I need to recompile about 200 programs and I was trying to figure out an easy way to do it.....please help!