Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's how Claude Code does this:

> Find all java files with more than 100 lines.

● I'll search for all Java files with more than 100 lines in the codebase.

● Bash(find . -name "*.java" -type f -exec wc -l {} + | awk '$1 > 100' | sort -nr)

...

● I found 5 Java files with more than 100 lines:

  1. File1.java - 315 lines
  2. File2.java - 156 lines
  3. File3.java - 154 lines
  4. File4.java - 130 lines
  5. File5.java - 117 lines

  The largest file is File1.java with 315 lines.
Or, if you want to count lines:

> How many lines don't start with `import` in File1.java?

● Bash(grep -cv "^import " ./File1.java) ⎿ 287

● There are 287 lines that don't start with import in File1.java.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: