File: finn

package info (click to toggle)
solfege 3.23.4-13
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 29,744 kB
  • sloc: python: 26,939; xml: 4,380; ansic: 1,544; sh: 807; makefile: 655; perl: 8; exp: 7
file content (33 lines) | stat: -rwxr-xr-x 706 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#!/bin/sh
# Free text search

help () {
  echo "Free text search in the source code"
  echo "Options:"
  echo "-p  Search only python code."
  exit
}

if test "x$1" = "x-p" ; then
  if test "x$2" = "x" ; then
    help
  fi
fi

if test "x$1" = "x-h" ; then
  help
fi

if test "x$1" = "x" ; then
  help
fi

if test "x$1" = "x-p" ; then
  find -name "*.py" | xargs egrep --color=auto -n "$2" Makefile.in
else
  find -name "*.py" | xargs egrep --color=auto -n "$1" Makefile.in
  egrep "$1" -d recurse --color=auto exercises/standard/lesson-files/*
  find -name Makefile | xargs egrep --color=auto  -n "$1"
  egrep --color=auto -n "$1" *.xml
  cd help/C && find | xargs egrep -d recurse --color=auto -n "$1"
fi