Search Results

Search: Posts Made By: wilg0005
15,553
Posted By wilg0005
Hey chebarbudo, Yes, that worked as well. ...
Hey chebarbudo,

Yes, that worked as well.


cat /myfiles/test.cob | sed -n "/MOVE '[^']*' TO VAR[12]/p" | sed "/1$/N; s/MOVE '\([^']*\)' TO VAR1\nMOVE '\([^']*\)' TO VAR2/\1\2/"
...
15,553
Posted By wilg0005
close...
Hey Jim,

Thanks, that is really close; I'm getting the output below. How can I print a new line instead of the second grep output (i.e. 'MOVE LIT2 TO VAR2') and a new line?


LIT1LIT2MOVE...
15,553
Posted By wilg0005
Find multiple patterns on multiple lines and concatenate output
I'm trying to parse COBOL code to combine variables into one string. I have two variable names that get literals moved into them and I'd like to use sed, awk, or similar to find these lines and...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 12:43 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy