Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


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

What are the different variables present in linux shell?

0 Answers  


How can I send a mail with a compressed file as an attachment?

0 Answers  


What is bash shell command?

0 Answers  


i have 2 tables 4 colums table 1 respective values a1 6, a2 8,a3 9,a4 14 & table 2 respective values a1 6, a2 8, a3 9, a4 12. if compare 2 tables 3 colums values same then 4th column values 1)Qes diff >5 then (5 * diff value ) 2)Qes diff <5 the 5 3)Qes diff 5 then 5 print respective values..

0 Answers   Tech Mahindra,


How will you connect to a database server from linux?

0 Answers  






How will you find the 99th line of a file using only tail and head command?

0 Answers  


What is meant by dos operating system?

0 Answers  


What is shell scripting?

0 Answers  


A file has multiple records each having three 30-bit long fields(field1,field2,field3).There is also a lookup file,LOOK_UP.dat.Now, we need to consider only the last ten digits of field1 and lookup the file LOOK_UP.dat. If there a match then field2 and field3 should replaced with corresponding data from the lookup file. otherwise that particular record,for which there is no match, should be stored in a seperate file.

2 Answers   Wipro,


What are the different commands available to check the disk usage?

0 Answers  


defination of mapfile in winrunner?

0 Answers  


What's the difference between scripting and coding?

0 Answers  


Categories