Output Redirection and Piping
Output Redirection
# list the current files and redirect the output to a file named "mylist.txt"
ls > mylist.txt
# view content of mylist.txt
cat mylist.txt# redirect the input to a command
cat < mylist.txt# redirect the output and append
cat mylist.txt > list1.txt
cat mylist.txt >> list2.txt
# view content
cat list2.txtPiping
Last updated
Was this helpful?
