Skip to content

Remove new lines from file


Sometimes, like when dealing with GCP service account keys you need to single line them, or you just want to be a terrible human and write all code on a single line, you can use this


cat <file> | tr -d '\n'

Want to make this site better? Open a PR or help fund hosting costs