I recently tried (unsuccessfully) to create a "here document" with
redirection (ala perl) as per example below:
[example]
odbc %irisdb %sql1 | tee con | ^
for %li in (@con:) echo <<-ETX1 >> clip:
INSERT INTO branch (asset, brnch, customer, external, internal,
xtended)
VALUES (%@field[0,%li], %@field[1,%li], %@field[2,%li],
%@if[%@isalnum[%@field[3,%li]],%@field[3,%li],null],
%@if[%@isalnum[%@field[4,%li]],%@field[4,%li],null],
%@if[%@isalnum[%@field[5,%li]],%@field[5,%li],null]);
ETX1
[/example] -- excuse the line wrapping
Of course TIMTOWTDI and I achieved something similar, but the method
depicted above would have been prettier.
I would like to suggest this method of redirection for consideration as
an enhancement to the "here document" feature. I hope others might find
this enhancement pretty useful too.
John
--
Regards
John McMahon
[email protected]
redirection (ala perl) as per example below:
[example]
odbc %irisdb %sql1 | tee con | ^
for %li in (@con:) echo <<-ETX1 >> clip:
INSERT INTO branch (asset, brnch, customer, external, internal,
xtended)
VALUES (%@field[0,%li], %@field[1,%li], %@field[2,%li],
%@if[%@isalnum[%@field[3,%li]],%@field[3,%li],null],
%@if[%@isalnum[%@field[4,%li]],%@field[4,%li],null],
%@if[%@isalnum[%@field[5,%li]],%@field[5,%li],null]);
ETX1
[/example] -- excuse the line wrapping
Of course TIMTOWTDI and I achieved something similar, but the method
depicted above would have been prettier.
I would like to suggest this method of redirection for consideration as
an enhancement to the "here document" feature. I hope others might find
this enhancement pretty useful too.
John
--
Regards
John McMahon
[email protected]