Archives
Trending
Support
Login
clear text
XML
Django
JavaScript
MATLAB
C
C++
C#
Python
SQL
Shell
Bash
Markdown
YAML
JSON
HTML
CSS
PHP
Java
Ruby
Go
Rust
Swift
Kotlin
Arduino
TypeScript
Perl
Autohotkey
Lua
SQF
R
Scala
Haskell
Groovy
Dart
Clojure
VB.NET
Objective-C
PowerShell
Bash
CoffeeScript
Verilog
#!/bin/bash echo "This is standard output" echo "This is an error" >&2 #as a function echoerr() { echo "$@" 1>&2; } echoerr "This is another error" echo "this is more standard output" echo "You can also use /dev/stderr for standard error output" >>/dev/stderr ###view only the standard out #./stio.sh 1> /dev/null ###This will save standard output and display only standard error #./stio.sh > test.log ###IF you want to save both standard output and error #./stio.sh > output.txt 2>&1 ###Another example #find / -name "test.png" > output.txt 2>&1 #find / -name "test.png" 2>/dev/null
Mark as private (unlisted)
for 30 minutes
for 6 hours
for 1 day
for 1 week
for 1 month
for 1 year
everlasting (like CCCP)