yvurya
Last Updated: February 25, 2016
·
1.032K
· 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

1385

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

over 1 year ago ·
1395

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

over 1 year ago ·