Skip to content

Commit

Permalink
Update one-liner-scripts.md
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinav-nath authored Jun 15, 2023
1 parent c7371ac commit afb458a
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions scripting/one-liner-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,9 @@ $ for f in config*New; do new_f=$(echo $f | sed 's/New//'); cp $f $new_f; rm -f
```shell
str="hello"; echo "len=${#str}"; if [[ ${#str} > 0 ]]; then echo "valid string"; else echo "empty string"; fi
```

#### Find out top 5 java files with maximum number of lines and display their line count

```shell
find . -name "*.java" -exec wc -l {} + | sort -rn | head -n 6 | tail +2
```

0 comments on commit afb458a

Please sign in to comment.