lec04 - CS114: Lecture 4 IO, Redirection, Job control...

Info iconThis preview shows pages 1–6. Sign up to view the full content.

View Full Document Right Arrow Icon
CS114: Lecture 4 IO, Redirection, Job control Please pick up homework 2
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Random tip of the day Searching in big manpages Press / then type a string and hit ENTER Press n to search again Very helpful with shell manpages
Background image of page 2
Standard files Standard input stdin in C, System.in in Java Reads from the terminal (console) unless redirected Standard output stdout in C, System.out in Java Writes to terminal unless redirected Standard error stderr in C, System.err in Java Like standard output, used for error messages
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Redirecting input and output To redirect standard input to come from a file, add < filename to the command To redirect standard output to go to a file, add > filename to the command ls ~ > files-in-my-home-dir To append standard output to a file, add >> filename to the command
Background image of page 4
Some commands that use stdin/stdout wc – count the number of lines, words, and characters in stdin head -37 – print the first 37 (or whatever) lines
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 6
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 12

lec04 - CS114: Lecture 4 IO, Redirection, Job control...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online