In The Toolbox – Live! (Tools of the Trade) Chris Oldwood ACCU Conference /

Slides:



Advertisements
Similar presentations
CST8177 awk. The awk program is not named after the sea-bird (that's auk), nor is it a cry from a parrot (awwwk!). It's the initials of the authors, Aho,
Advertisements

1 Unix Talk #2 AWK overview Patterns and actions Records and fields Print vs. printf.
Unix Scripting A Tutorial for Computational Linguistics (CSE 506/606) Kristy Hollingshead Fall
AWK: The Duct Tape of Computer Science Research Tim Sherwood UC Santa Barbara.
AWK: The Duct Tape of Computer Science Research Tim Sherwood UC San Diego.
Selection Sort
Grep, comm, and uniq. The grep Command The grep command allows a user to search for specific text inside a file. The grep command will find all occurrences.
Database Development Using TDD Chris Oldwood ACCU Conference /
Unix Files, IO Plumbing and Filters The file system and pathnames Files with more than one link Shell wildcards Characters special to the shell Pipes and.
Filters using Regular Expressions grep: Searching a Pattern.
CS 124/LINGUIST 180 From Languages to Information Unix for Poets (in 2014) Dan Jurafsky (From Chris Manning’s modification of Ken Church’s presentation)
Or CMD/BATCH.  Title this comand makes the cmd prompt’s title whatever you would like it to be.
Adv. UNIX: Filters/41 Advanced UNIX v Objectives –to discuss five useful filters: tr, grep, awk, sed, and find Special Topics in Comp.
Advanced File Processing
Using the Unix Shell There is No ‘Undelete’. The Unix Shell “A Unix shell is a command-line interpreter or shell that provides a traditional user interface.
Linux Tools. Tar tar – (Tape Archive). This is a tool for archiving files and directory hierarchies. tar output can be sent to stdout using the – file.
System Programming Regular Expressions Regular Expressions
Agenda Sed Utility - Advanced –Using Script-files / Example Awk Utility - Advanced –Using Script-files –Math calculations / Operators / Functions –Floating.
LIN 6932 Unix Lecture 6 Hana Filip. LIN 6932 HW6 - Part II solutions posted on my website see syllabus.
Unix Talk #2 (sed). 2 You have learned…  Regular expressions, grep, & egrep  grep & egrep are tools used to search for text in a file  AWK -- powerful.
Introduction to Unix (CA263) File Processing. Guide to UNIX Using Linux, Third Edition 2 Objectives Explain UNIX and Linux file processing Use basic file.
Unix programming Term: III B.Tech II semester Unit-II PPT Slides Text Books: (1)unix the ultimate guide by Sumitabha Das (2)Advanced programming.
Day 2 Review of ITSK1601 – Intro Unix.. Break up into Cousin groups Each cousin group will work as a team. Each team will need 5 blank sheets of paper.
Review Please turn in your homework and practicals sed.
CIS 218 Advanced UNIX1 CIS 218 – Advanced UNIX (g)awk.
Lecture 2 Regular Expression Parsing Awk. Shell Quoting Shell Globing: file* and file? ls file\* (the backslash key escapes wildcards)
Geographical Terms: What do they look like?. TEKS: (ELA) TEK: Reading/Vocabulary Development. Students are expected to (E) use a dictionary, glossary,
Chapter 10 Advanced File Processing. Regular Expressions A compact notation for representing patterns in strings Used by many common Linux utilities such.
Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command to search for.
Chapter Five Advanced File Processing Guide To UNIX Using Linux Fourth Edition Chapter 5 Unix (34 slides)1 CTEC 110.
Chapter Five Advanced File Processing. 2 Objectives Use the pipe operator to redirect the output of one command to another command Use the grep command.
Module 6 – Redirections, Pipes and Power Tools.. STDin 0 STDout 1 STDerr 2 Redirections.
A Menu-Driven Application Yonglei Tao. Problem Statement  Develop a script program that allows the user to create and maintain an directory, called.
I/O Redirection and Regular Expressions February 9 th, 2004 Class Meeting 4.
Introduction to Unix – CS 21 Lecture 12. Lecture Overview A few more bash programming tricks The here document Trapping signals in bash cut and tr sed.
Chapter Five Advanced File Processing. 2 Lesson A Selecting, Manipulating, and Formatting Information.
UNIX An Introduction. Brief History UNIX UNIX Created at Bell Labs, 1969 Created at Bell Labs, 1969 BSD during mid 70s BSD during mid 70s AT&T began offering.
Searching and Sorting. Why Use Data Files? There are many cases where the input to the program may come from a data file.Using data files in your programs.
Getting the most out of the workshop Ask questions!!! Don’t sit next to someone you already know Work with someone with a different skillset and different.
I/O Redirection & Regular Expressions CS 2204 Class meeting 4 *Notes by Doug Bowman and other members of the CS faculty at Virginia Tech. Copyright
숙명여대 창병모 2011 가을 1. 파일 조작  filtering, sorting, comparing, searching for files 명령어 스케줄링  cron, at 텍스트 처리 프로그램  AWK 파일 보관 및 압축  archiving  tar, gzip.
Advanced Text Processing. 222 Lecture Overview  Character manipulation commands cut, paste, tr  Line manipulation commands sort, uniq, diff  Regular.
Selection Sort
By Corey Stokes 9/14/10. What is grep? Global Regular Expression Print grep is a command line search utility in Unix Try: Search for a word in a.cpp file.
BASH – Text Processing Utilities Erick, Joan © Sekolah Tinggi Teknik Surabaya 1.
Awk- An Advanced Filter by Prof. Shylaja S S Head of the Dept. Dept. of Information Science & Engineering, P.E.S Institute of Technology, Bangalore
Alon Efrat Computer Science Department University of Arizona Unix Tools.
Test-Driven SQL Chris Oldwood Agile on the Beach /
1 Lecture 10 Introduction to AWK COP 3344 Introduction to UNIX.
ORAFACT Text Processing. ORAFACT Searching Inside Files grep - searches for patterns within files grep [options] [[-e] pattern] filename [...] -n shows.
UNIX commands Head More (press Q to exit) Cat – Example cat file – Example cat file1 file2 Grep – Grep –v ‘expression’ – Grep –A 1 ‘expression’ – Grep.
Waltzing with Branches Chris Oldwood Agile on the Beach /
1 Commands, editing, Variables More commands, and more details –echo- uniq- find –grep- sort –sed- diff –cut- pr Editing –vi- emacs Shell Variables Environment.
AWK One tool to create them all AWK Marcel Nijenhof Eth-0 11 Augustus 2010.
Introduction to Textutils sort, uniq, wc, cut, grep, sed, awk ● Steve Walsh ● Linux Users of Victoria ● November, 2007.
Lesson 5-Exploring Utilities
Advanced File Processing
Unix Scripting Session 4 March 27, 2008.
Grep Allows you to filter text based upon several different regular expression variants Basic Extended Perl.
Guide To UNIX Using Linux Third Edition
Unix Talk #2 grep/egrep/fgrep (maybe add more to this one….)
Unix Talk #2 (sed).
NoodleBib Create a Annotated Bibliography using MLA format*
CSE 303 Concepts and Tools for Software Development
1.5 Regular Expressions (REs)
Awk.
Software I: Utilities and Internals
The __far* Side Chris Oldwood
WELL WORKED THINGS IN P0 Good vibrations and nice atmosphere:
Review.
Presentation transcript:

In The Toolbox – Live! (Tools of the Trade) Chris Oldwood ACCU Conference /

Why the C Vu Column?

Part I - Tooling Choices

The Right Tool

Finding Text FIND / FINDSTR FIND / FINDSTR GREP (EGREP / FGREP) GREP (EGREP / FGREP) BareGrep / BareTail BareGrep / BareTail Notepad / Notepad++ Notepad / Notepad++ SED SED AWK AWK PowerShell PowerShell Visual Studio Visual Studio Google Google

The Wrong Tool

set filename=trello.json set releaseId=v1.5.2 sed -n "/^\t\"cards\"/,/^\t}],/p" %filename% | ^ egrep -i "idlist|shortUrl|idshort|name" | ^ sed -n "/%releaseId%/,/shortUrl/p" | ^ egrep -i "\"idshort\"|\"name\"" | ^ sed "s/\s*.idShort...//" | ^ sed "s/\s*.name.://" | ^ sed "s/,$//" | ^ sed "s/^\s*//;s/\s*$//" | ^ sed "s/""//g" | ^ gawk "!(NR%3) { printf \"%03s %-14s %s\n\", first, $0, second } { first=second; second=$0 }" | ^ sort

“If you cannot think of three ways of abusing a tool, you do not understand how to use it.” -- Gerald Weinberg

Home-Grown Tools

One-Liners (No Pun Intended)

> PowerShell "gci Build\Release\Company*.dll | % { $_.VersionInfo }" > for /r /d %d in (*.*) exist "%d" rmdir /q "%d" 2> nul > for /d %d in (*) "%d" && pushd "%d" && (if exist "clean.cmd" call clean.cmd --all) && (if exist "Source\clean.cmd" pushd Source && call clean.cmd --all && popd) && popd > sed -n "/ (.+) "%temp%\csproj-refs“ && egrep "dependency" proj.nuspec | gawk "match($0,/=\042(.+)\042 v/,ary) {print ary[1]}" | sort > "%temp%\nuspec-deps“ && diff --ignore-case --side-by-side "%temp%\csproj-refs" "%temp%\nuspec-deps"

Automation

Part II – Unlikely Choices

Pen & Paper

Dictionary & Thesaurus

“Never use the words get, put or nice.” -- My Wife’s English Teacher

Questions?

Want to Know More? C Vu – In The Toolbox C Vu – In The Toolbox /