Link to home
Start Free TrialLog in
Avatar of faithless1
faithless1

asked on

Appending Words

Hello,

I need to append words from a file across another file by specifying columns to where append the data.

input.txt
Word1
Word2
etc

output.txt
went to the store
came back from the store

If 0 is specified in a script, then it would be ideal to have input rows to be appended at the beginning of each line. If 1 is specified, then input rows would be appended after 1st word etc. In case where a row does not contain a column before or after which to append the word, it can be ignored.

Thank you
Avatar of ozo
ozo
Flag of United States of America image

So in this case, would you want the result for 0 to be
Word1 went to the store
Word2 came back from the store
and if 1 is specified
went Word1 to the store
came Word2 back from the store
?

ASKER CERTIFIED SOLUTION
Avatar of wilcoxon
wilcoxon
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of faithless1
faithless1

ASKER

Awesome, thank you