Module 48 min

Viewing and Searching Text

cat, less, head, tail, grep

EDA tools produce text reports, often huge ones. Knowing how to view and search them quickly is one of the highest-value skills in this whole path.

Viewing files

bash
cat config.json         # dump a whole (small) file to the screen
less timing.rpt         # page through a big file (q to quit, / to search)
head report.rpt         # first 10 lines
head -50 report.rpt     # first 50 lines
tail report.rpt         # last 10 lines
tail -f run.log         # follow a log live as it grows (great for runs)

grep: the report engineer best friend

grep finds lines that match a pattern. On a thousand-line timing report, it takes you straight to what matters.

bash
grep "VIOLATED" timing.rpt        # show only violated paths
grep -i "error" run.log           # case-insensitive search
grep -c "VIOLATED" timing.rpt     # count matches instead of showing
grep -n "WNS" timing.rpt          # show line numbers too
grep -A 5 "Startpoint" timing.rpt # show 5 lines after each match
Pro tip

tail -f on a running log is how engineers watch a long tool run in real time, and grep is how they find the one number that matters in a giant report. Master these two and you will read reports faster than people who scroll by hand.

Watch out

cat on a very large file floods your terminal and can hang it. Use less for anything big; it loads a page at a time and lets you search with / and quit with q.