Append 1st field from a file into 2nd field of another file

Hi,

I've internally searched through forums for about 2+ hours. Unfortunately, with no luck. Although I've found some cases close to mine below, but didn't help so much.

Actually, I'm in short with time. So I had to post my case. Hoping that you can help.

I have 2 files,

FILE1

23444,
12333,
55578,

FILE2

8
9
8

I want to

(a) append the filed in FILE2, into 2nf field of FILE1:

23444, 8
12333, 9
55578, 8

and in other run

(b) append the filed in FILE2, into FILE1 as follows:

23444,8
12333,9
55578,8 

In ADDITION & generally, can you provide me with a solution that:
extracts the "Nth" field from FILE1 into the "Mth" filed in FILE2?

Waiting for your input, with my appreciation in advance.

BR,
Ahmed

You could use paste, but that would leave a space...

paste -d' ' file1 file2

A general solution would be this:

awk '{p=$1;getline<f;print p$1}' f=file2 file

or rather,

awk '{p=$m;getline<f;print p$n}' m=1 n=1 f=file2 file