skip to main | skip to sidebar

javacream

Java Talks , Tips Tutorials and sample codes.

Thursday, January 22, 2009

Redirect StdErr to Stdin in Batch and Shell Scripts

On windows command prompt :

mybatch.bat 1> log.txt 2>&1

This redirects stdin to log.txt and stderr to stdin

On Bash Linux Shell:
grep * &> allout.txt


Posted by Hakan ISIK at 1:09 AM 0 comments
Labels: non-java
February 2009 October 2008 Home
Subscribe to: Posts (Atom)

Labels

  • Basic Java Tutorials (5)
  • Java Database JDBC (5)
  • JSP Servlet (4)
  • non-java (4)
  • Java IO (3)
  • Basic Java (1)

Blog Archive

  • ▼  2009 (5)
    • ►  October (1)
      • Convert Java Date to Mysql Date
    • ►  March (2)
      • How to measure distance on google maps ?
      • Check if a String contains letter
    • ►  February (1)
      • Get MimeType of A File
    • ▼  January (1)
      • Redirect StdErr to Stdin in Batch and Shell Script...
  • ►  2008 (19)
    • ►  October (1)
      • Get Remote IP Address In Axis SOAP Server
    • ►  September (1)
      • Google Chrome Ready For Download
    • ►  August (1)
      • Console Beep On Error Line of a Log File
    • ►  July (4)
      • Using Java Properties File
      • Java MD5 Hash Sample
      • Java HTPPS SSL Client
      • Sample JSP Date Combo
    • ►  June (3)
      • Convert Date object to Mysql Date Format
      • JSP Sessions Example
      • Simple JSP Tutorial
    • ►  May (6)
      • JDBC Transaction
      • What is NullPointerException ?
      • Escape HTML and XML in Java
      • Tomcat JDBC Connection Pooling
      • Java Mysql JDBC Tutorial
      • Sort a HashMap based on Keys or Values
    • ►  April (3)
      • Read and Write Files in Java
      • Java HTTP GET POST
      • Arrays in Java

About Me

Hakan ISIK
View my complete profile
 

Add to Technorati

Add to Technorati Favorites