In a shell script, we can perform input and output redirection using the < and > symbols.  For example, to redirect the output of a command to a file, we can use the > symbol followed by the name of the file. For example:  # Redirect the output of the "ls" command to a file called "directory_listing.txt"  ls > directory_listing.txt  To append the output of a command to a file, you can use the >> symbol instead of >. For example:  # Append the output of the "ls" command to the file "directory_listing.txt"  ls >> directory_listing.txt  To redirect the input of a command from a file, you can use the < symbol followed by the name of the file. For example:  # Sort the contents of the file "unsorted_list.txt" and store the result in "sorted_list.txt"  sort < unsorted_list.txt > sorted_list.txt  You can also use multiple redirections in a single command. For example:  # Sort the contents of the file "unsorted_list.txt" and store the result in "sorted_list.txt", then display the results on the screen  sort < unsorted_list.txt > sorted_list.txt | cat  In this example, the output of the sort command is redirected to the file "sorted_list.txt", and the cat command is used to display the contents of the file on the screen.  Note, that these redirections can also be used in combination with other shell commands and constructs, such as loops and conditional statements.