I want to read all input to the command from file1 direct all output to file2 and error to file 3, how can I achieve this?

Answer Posted / shubham shivaji kale

You can use the following command:

# cat file1 > file2 2> file3

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

how to get part of string variable with echo command only?

665


Is it possible to substitute "ls" command in the place of "echo" command?

696


How to get the last line from a file using just the terminal?

758


What is the difference between grep and egrep?

687


What is awk in shell scripting?

655






What are filters explain sort with all the options available?

1030


How can the contents of a file inside jar be read without extracting in a shell script?

698


What does $0 mean in shell script?

643


How to check if a directory exists?

644


How do I open the shell prompt?

674


Print the 10th line without using tail and head command.

1783


What is a file basename?

679


What is the default shell of solaris?

652


Why do we use shell scripting?

615


write a shell script to check the failed jobs?

4036