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?



I want to read all input to the command from file1 direct all output to file2 and error to file 3, h..

Answer / 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

More Shell Script Interview Questions

How do I open the shell in cmd?

0 Answers  


I have 2 files and I want to print the records which are common to both.

0 Answers  


Suppose you execute a command using exec, what will be the status of your current process in the shell?

0 Answers  


How to group the commands in shell scripting?

2 Answers   Polaris,


Why do we write bin bash in shell scripts?

0 Answers  






What are the additional egrep symbols?

2 Answers  


How to replace following lines, catch (DAOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } catch (BOException e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw e; } catch (Exception e) { objLogger.error(this.getClass () + "addUpdateIssues() " + e); throw new BOException(5122); } Needs to be changed in to, catch (DAOException e) { AppException.handleException (null, null, e, null, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); } catch (BOException e) { AppException.handleException (null, null, null, e, null, null, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 0); } catch (Exception e) { AppException.handleException (null, null, null, null, null, e, "BOException", this.getClass() + "addUpdateIssues() ", null, null, null, null, null, null, null, null, 5122); }

0 Answers   Wipro,


How do I edit a .sh file?

0 Answers  


When you login to a c shell, which script would be run first?

2 Answers  


What is shell application?

0 Answers  


What is the need of including script interpreter in your shell script?

2 Answers  


How do I run a shell script in powershell?

0 Answers  


Categories