Write down a shell script program that would add the line "This is my file" at the top of each file having the extension 'txt' in the current…
Write down a shell script program that would add the line "This is my file" at the top of each file having the extension 'txt' in the current directory. Note that all the other contents of the .txt file(s) would remain unchanged and start from the second line.
From the BPDB Assistant Engineer (CSE) 2021 – Written (BUET) exam, question 6 of 6.