Last Updated: February 25, 2016
·
1.247K
· jacaetevha

commandline output for coderwall.com

Want to paste some output from your commandline in your coderwall post? Don't want to put the text in an editor in order to get the needed spaces at the beginning? Pipe it to sed like this:

<output>  | sed -e 's/^/    /'

This example....

echo '{"some": "output", "more": "stuff"}' | json_reformat | sed -e 's/^/    /' 

...produces:

{
    "some": "output",
    "more": "stuff"
}

2 Responses
Add your response

You can accomplish that also by selecting your code and hitting <kbd>Tab</kbd>

over 1 year ago ·

This is meant for CL output, not code in an editor.

over 1 year ago ·