I have a file MAT.txt which contains the following data:
mat1.txt
mat2.txt
.
.
.
.
mat100.txt
I want to remove the '.txt' from every line and have an output file with the following data:
mat1
mat2
.
.
.
.
mat100
I know this can be done with sed easily for each line, but I do not know how to use sed in a loop and have a script that does the editing from line 1 to line 100.
The following code works, but I need it in a loop:
Sorry, i should be more specific with describing MAT.txt.
It has 3 columns:
mat1.txt 548726 A
mat1.txt 125484 B
mat1.txt 568543 A
mat1.txt 885647 B
.
.
.
.
.
mat100.txt 898468 A
The result should look like:
mat1 548726 A
mat1 125484 B
mat1 568543 A
mat1 885647 B
.
.
.
.
.
mat100 898468 A