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

Info icon This 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”.
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
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
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)
Image of page 4
Interactive searching in text files vi, less - / Emacs – Ctrl-S Nano – Ctrl-W
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 ]}

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern