I'm trying to make a txt file with a generated key into 1 line. example:
<----- key start -----> lkdjasdjskdjaskdjasdkj skdhfjlkdfjlkdsfjsdlfk kldshfjlsdhjfksdhfksdj jdhsfkjsdhfksdjfhskdfh jhdfkjsdhfkjsdhfkjsdhf <----- key stop ----->
I want it to look like:
lkdjasdjskdjaskdjasdkjskdhfjlkdfjlkdsfjsdlfkkldshfjlsdhjfksdhfksdjjdhsfkjsdhfksdjfhskdfhjhdfkjsdhfkjsdhfkjsdhf
Notice I also want the lines <----- key start ----->
and <----- key stop ----->
removed. How can I do this? Would this be done with sed
?
Step 1: Be prepared with the text which you want to convert. Step 2: Copy the text, JSON, String, Pdf or XML (whichever you want to convert). Step 3: Paste the copied content in the space provided. Step 4: Finally click the "convert" option to get the text converted in a single line.
tr -d '\n' < key.txt
Found on http://linux.dsplabs.com.au/rmnl-remove-new-line-characters-tr-awk-perl-sed-c-cpp-bash-python-xargs-ghc-ghci-haskell-sam-ssam-p65/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With