|
command for selecting specific lines from a script
I need help on following script:
I need to print the lines which are in bold letters in separate file as
record
string("|") emp_name;
string("|") emp_id;
decimal("|") emp_salary;
string("|") emp_status;
string("\n") emp_proj;
end
Above lines are related to file ${_AB_PROXY_DIR}"'/rf_emp_status_emp_proj-3.dml which is present in 19 th line in below script.
The issue is i need to print only specific lines which are in bold letters in separate file. In below script you will find one field record which will be repeating more times . I need to select all that that lines fromrecord field to end of file ${_AB_PROXY_DIR}"'/rf_emp_status_emp_proj-3.dml.
Please can you help on sending that bold letter fields into separate file.
I am highliting all that lines in below script wich i want in seperate file, in red color
print -r -- 'record
string("|") emp_name;
string("|") emp_id;
decimal("\n") emp_salary;
end' > "${_AB_PROXY_DIR}"'/in_emp_data-1.dml'
print -r -- '/*Reformat operation*/
out::reformat(in) =
begin
out.*:: in.*;
out.emp_status :: if(next_in_sequence()<3) "A" else "D";
out.emp_proj :: "ABC";
end;' > "${_AB_PROXY_DIR}"'/rf_emp_status_emp_proj-2.xfr'
print -r -- 'record
string("|") emp_name;
string("|") emp_id;
decimal("|") emp_salary;
string("|") emp_status;
string("\n") emp_proj;
end;' > "${_AB_PROXY_DIR}"'/rf_emp_status_emp_proj-3.dml'
print -r -- '/*Reformat operation*/
out::reformat(in) =
begin
out.*:: in.*;
out.emp_loc :: "USA";
end;' > "${_AB_PROXY_DIR}"'/rf_emp_location-4.xfr'
print -r -- 'record
string("|") emp_name;
string("|") emp_id;
string("|") emp_salary;
string("|") emp_status;
string("|") emp_proj;
string("\n") emp_loc;
end;' > "${_AB_PROXY_DIR}"'/rf_emp_location-5.dml'
Thanks,
gangadhar.
|