cheat sheets.

$ cheat redirect
# Redirection (Zsh)

		command < file					# Send contents of file to command
		
		command > file | grep -i error	# Redirect to file and pipe
		
		command 2> file2 > file1 2>&1	# Redirect Stderr twice

		command << 'text'				# Text to Stdin (command)

		command > file 2>&1				# Redirect both Stdout and Stderr to file

		command > file1 2> file2		# Redirect Stdout to one file and Stderr to another

		command 2>&1 | command2			# Pipe Stdout and Stdin to another process
Version 2, updated 695 days ago.
. o 0 ( | previous | history | revert to | current | diff )
( add new | see all )