unix - how to check for a pattern at the end of a line and delete new line -
unix - how to check for a pattern at the end of a line and delete new line -
i trying clean file looks like:
insert....; update.....; del ete.......; in sert........; i remove new line characters lines don't end semicolon , after cleaning file should like:
insert.......; update.......; delete.......; insert........;
you mean this?
$ cat in insert....; update.....; del ete.......; in sert........; $ awk '{if ($0 ~ /;$/) {print} else {printf ("%s", $0)}}' in insert....; update.....; delete.......; insert........; unix
Comments
Post a Comment