The contents of file001 are: [code] 232 25*50 [/code] What will be the contents of result.txt? [code]bc < file001 > result.txt[/code]

Danh Trịnh

New member
The contents of file001 are:
Code:
    232
    25*50
What will be the contents of result.txt?
Code:
bc  < file001 > result.txt
A. undefined
B. erroneous
C. 429467296, 1250
D. 1650
 
Answer: c
Explanation: We can redirect bc’s standard input to come from file001 and save the output in another file named result.txt. bc obtained the expressions from the redirected standard input, processed them and sent out the results to a redirected output stream. Here bc command is used as a filter.
 

Tìm kiếm

Back
Top