How to insert custom string in the result of Linux paste command How to insert custom string in the result of Linux paste command shell shell

How to insert custom string in the result of Linux paste command


Maybe there's a way to do this with paste, but it can certainly be done easily with awk:

paste c1 c2 | awk '{ printf("var %s = some_function(%s);\n", $1, $2); }'


process your file through with a separate command and pipe it to the paste command

your_command c1 | paste c1 - c2