watchmansky
watchmansky

Reputation: 190

how redirect the output of command to graphical text editor

I'm lost inside myself, so I'd like redirect output of command to graphical text editor (pluma).

cat test.sh > test_tmp && /usr/bin/pluma test.tmp

I need semplify operation redirecting "cat test.sh" directly to pluma

thanks

Upvotes: 0

Views: 419

Answers (1)

DRC
DRC

Reputation: 5048

Generalizing the concept you can use process substitution, but I should point out that it doesn't work in every editor, in vim for example it does:

vim <(echo "outputting something from a script")

otherwise just make a temp file and then open it with your editor.

file=$(mktemp) && ./script > $file && pluma $file

Upvotes: 1

Related Questions