File: validation

package info (click to toggle)
sedsed 2.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,008 kB
  • sloc: sed: 37,239; ansic: 2,395; python: 815; sh: 624; makefile: 95
file content (12 lines) | stat: -rwxr-xr-x 292 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
#!/bin/sh

set -e

OK_RESULT='PATT:x@x.com$COMM:s/@.*//PATT:x$xPATT:y@y.com$COMM:s/@.*//PATT:y$y'

result=`printf "x@x.com\ny@y.com\n" | sedsed -d --hide=hold --nocolor \
                                     's/@.*//' | tr -d '\n' | tr -d ' '`

[ "$result" = "$OK_RESULT" ] || exit 1

exit 0