posted 10 years ago
Hi,
New to shell scripting.
I have a .txt file with values
1,abc,123,
2,xyz,456,
My requirement is to pick a column value from database and add it to the .txt file values
say 1,abc,123,sh1-123,
2,xyz,456,sh1-123,
Right now I am using
sed 's/"$l_shipment_number",/' <file_name>
where l_shipment_number=`sqlplus -s $FCP_LOGIN <<!!
SET head off
SET feed off
SET term off
SELECT DISTINCT shipment_number
FROM table
WHERE processed_file_name = <>
EXIT;
!!`
Now, I am not getting the value as needed in such a case.
Can you please let me know what the issue here is ?