Explain what is command grouping and Mention How does it work?

DWQA QuestionsCategory: LinuxExplain what is command grouping and Mention How does it work?
Editor Staff asked 11 months ago

Explain what is command grouping and Mention How does it work?

1 Answers
Editor Staff answered 11 months ago

You can use parentheses to group commands. For example, if you want to send the current date and time along with the contents of a file named OUTPUT to a second file named MYDATES, you can apply command grouping as follows: (date cat OUTPUT) > MYDATES