Hi,
I imagine this is a trivial question for you.
I am writing a ksh script that prompts the user to enter several IDs and then stores it into a file, so the list can be used within a sql statement.
the file looks like this:
--- File 1 ----
'12323kkk',
'teerkkwe',
'445kksk3',
'sdfdkkkk'
---------------
The sql statament in which I would like to insert this list looks like this:
--- File 2 ----
Select
field 1,
field 2
from
table
where
value in (
********
)
/
-------------------
The idea is to replace the eight asterisks in File 2 with the list from file one.
I am not sure what is the simplest option here: sed, awk?
Do you have any suggestions?
Thanks beferehand for your help,
Jalr2003
I imagine this is a trivial question for you.
I am writing a ksh script that prompts the user to enter several IDs and then stores it into a file, so the list can be used within a sql statement.
the file looks like this:
--- File 1 ----
'12323kkk',
'teerkkwe',
'445kksk3',
'sdfdkkkk'
---------------
The sql statament in which I would like to insert this list looks like this:
--- File 2 ----
Select
field 1,
field 2
from
table
where
value in (
********
)
/
-------------------
The idea is to replace the eight asterisks in File 2 with the list from file one.
I am not sure what is the simplest option here: sed, awk?
Do you have any suggestions?
Thanks beferehand for your help,
Jalr2003