I have file one containing Mac Addresses minus colon. I would like to add them to a different file with columns seperated by commas. Such as
File 1
0000aa1122
0000aa1123
0000aa1126
Output File
Name, MacAddress,Date
Something, 0000aa1122,Something
Something, 0000aa1123,Something
Something, 0000aa1126,Something
I know awk should be able to do this quite easily but I am unable to work it out. Maybe a different tool would be better. Anyhelp would be appreciated.
sed 's/.*/Something, &,Something/' File1 > OuputFile
That produced a continuous string of.
Something, 0000aa1122 0000aa1123 0000aa11268, Something . It would be more ideal if it was.
Something, 0000aa1122, Something
Something, 0000aa1123, Something
Something, 0000aa1126, Something
Dividing each entry in the first file and putting it in the middle of each line.
TIA
what's your input file look like?
Looks Like
File 1.
0000aa1122
0000aa1123
0000aa1126
thanks
given the file above,
sed 's/.*/Something, &,Something/' file1
the result looks like this:
Something, 0000aa1122,Something
Something, 0000aa1123,Something
Something, 0000aa1126,Something
Is that what you want?
If not quote your desired output using the code tags.
Thanks that was it. Not sure what happened the first time. But that output was as desired at first thanks.