1) combine 2 lines: sed 'N;s/\n/ /' yourFile https://stackoverflow.com/questions/9605232/how-to-merge-every-two-lines-into-one-from-the-command-line 2) remove only first comma sed -i.bak 's/,//' file https://stackoverflow.com/questions/2478232/how-to-remove-first-comma-on-each-line-in-a-file 3) remove 1st space - excel - =trim(cell #) https://www.excelforum.com/excel-general/1108037-remove-first-space-in-multiple-cells.html 4) find 2 uppercase letters: =SUM((CODE(MID(A3043,ROW(INDIRECT("1:"&LEN(A3043)-1)),1))>=64)*(CODE(MID(A3043,ROW(INDIRECT("1:"&LEN(A3043)-1)),1))<=90)*(CODE(MID(A3043,ROW(INDIRECT("2:"&LEN(A3043))),1))>=64)*(CODE(MID(A3043,ROW(INDIRECT("2:"&LEN(A3043))),1))<=90)) https://stackoverflow.com/questions/34786397/find-consecutive-uppercase-letters-in-excel-column 5) txt -> json https://sendeyo.com/onlineconverter/en/txt/json