2 scripts

Can anyone help with the following ?

  1. Write a script that will take input from a file, re-arrange the data then output to another file.

Contents of the first data file
1234 abc
5678 xyz
Contents of the output file
abc 1234
xyz 5678

  1. Write a script that will take data from a file, sum the numbers then output in a specific format below.

Contents of the data file
10
15
16
30
56

Specific Output
10 + 15 = 25
25 + 16 = 41
41 + 30 = 71
71 + 56 = 127

Thanks in advance

From the rules:
(6) Do not post classroom or homework problems.

I'm closing this thread.