File: sedfile

package info (click to toggle)
dict-devil 1.0-8
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k, sarge
  • size: 428 kB
  • ctags: 17
  • sloc: makefile: 66; perl: 46; sh: 31
file content (17 lines) | stat: -rw-r--r-- 771 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/^[A-Z]\+\,/s/[A-Z]\+/:%:/g 
/^[A-Z]\+,/s/[A-Z]\+/:%:/g 
The address in both forms above works in grep to locate the lines,if
enclosed in quotes.

The above all failed, but the following seems to almost work: (It sets
out initail caps with :s)
bob:vc-/0:dict-devil>sed -e '/^[A-Z]\+,/s/[A-Z]\+/:&:/g' devil-test >|devil-out
However, the `,' in the address prevents it from acting on lines such
as `BABE or BABY, n.'.

The following seems to work: (solves the two problems mentioned above)
sed -e '/^[A-Z]\{2,\}/s/[A-Z]\{2,\}/:&:/g' devil-test >|devil-out

The following seems to work, also: (This is the first time I have been
successful using the `named classes of character', eg. [:upper:])
sed -e '/^[[:upper:]]\{2,\}/s/[[:upper:]]\{2,\}/:&:/g' devil-test >|devil-out