File: writetm

package info (click to toggle)
viewmol 2.4.1-25
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 7,720 kB
  • sloc: ansic: 30,727; python: 1,849; sh: 943; awk: 433; makefile: 175
file content (45 lines) | stat: -rwxr-xr-x 1,458 bytes parent folder | download | duplicates (8)
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
34
35
36
37
38
39
40
41
42
43
44
45
#! /bin/sh
#*******************************************************************************
#                                                                              *
#                                   Viewmol                                    *
#                                                                              *
#                                W R I T E T M                                 *
#                                                                              *
#                 Copyright (c) Joerg-R. Hill, October 2003                    *
#                                                                              *
#*******************************************************************************
#
# $Id: writetm,v 1.5 2003/11/07 12:59:07 jrh Exp $
# $Log: writetm,v $
# Revision 1.5  2003/11/07 12:59:07  jrh
# Release 2.4
#
# Revision 1.4  2000/12/10 15:19:25  jrh
# Release 2.3
#
# Revision 1.3  1999/05/24 01:28:05  jrh
# Release 2.2.1
#
# Revision 1.2  1999/02/07 22:00:18  jrh
# Release 2.2
#
# Revision 1.1  1998/01/26 00:35:39  jrh
# Initial revision
#
#

case `uname -s` in
  SunOS*) AWK=nawk
          ;;
  IRIX*)  AWK=nawk
          ;;
  *)      AWK=awk
          ;;
esac

export LANG="C"
cat | $AWK 'BEGIN {printf("$coord\n");}
            /^\$/ {readcoord=0;}
                  {if (readcoord == 1) print $0;}
            /^\$coord/  {readcoord=1;}
            END         {printf("$end\n");}' > "$1"