{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

lec05 - CS114 Lecture 5 Text processing regular expressions...

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

View Full Document Right Arrow Icon
CS114: Lecture 5 Text processing, regular expressions Have you started HW2? Any questions on HW2? Office hours tomorrow as usual Small bug at the end of HW2 - “processes” should be “jobs”.
Background image of page 1

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

View Full Document Right Arrow Icon
What's a text file? Contains only 7-bit ASCII text How do you tell if a file is a plain, ASCII text file? “Human readable” Not rich text – no bold , italic , fonts , etc. Not Unicode “Universal” - can read on any operating system, with many programs Except line breaks
Background image of page 2
Line breaks DOS/Windows world Lines end in \r\n (0x13 0x10; ^M ^J) UNIX world Lines end in \n Usually doesn't matter... Notepad is stupid Sometimes scripts won't run Sometimes you'll see extra ^Ms
Background image of page 3

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

View Full Document Right Arrow Icon
Where are text files used in UNIX? Everywhere! Configuration files .cshrc, vimrc/.emacs, startup scripts Programs Shell scripts, Perl / Python / Tcl / .. Data Text documents (LaTeX) “databases” (e.g. /etc/passwd)
Background image of page 4
Interactive searching in text files vi, less - / Emacs – Ctrl-S Nano – Ctrl-W
Background image of page 5

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

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

{[ snackBarMessage ]}