Skip to content

Instantly share code, notes, and snippets.

@ubuntux
Last active May 22, 2018 16:49
Show Gist options
  • Save ubuntux/174dfce2d194ccbf83258e663ba8bafb to your computer and use it in GitHub Desktop.
Save ubuntux/174dfce2d194ccbf83258e663ba8bafb to your computer and use it in GitHub Desktop.
Saving STDOUT into a file

Just pipe it into a file(name) using >:

someCommand > someFile.txt

Or if you want to append data:

someCommand >> someFile.txt

If you want STDERR too, use this:

someCommand &> someFile.txt  

or this, to append:

someCommand &>> someFile.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment