/docs/MyDocs

To get this branch, use:
bzr branch http://darksoft.org/webbzr/docs/MyDocs

« back to all changes in this revision

Viewing changes to Development/languages/awk/awk.virables

  • Committer: Suren A. Chilingaryan
  • Date: 2009-04-09 03:21:08 UTC
  • Revision ID: csa@dside.dyndns.org-20090409032108-w4edamdh4adrgdu3
import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
######################## Standart Virables ####################################
 
2
$0                      # Current String
 
3
$1 $2 ... $n            # Words of current string
 
4
IGNORECASE = 1          # Set for case insensitive Regular Expression 
 
5
                        # and string comparisions
 
6
 
 
7
ARGC, ARGV              # Command line parametrs ( from 0 ), as in C
 
8
                        # Input Files managed by this variables, so input
 
9
                        # files may been managed from "START" section
 
10
ARGIND                  # Input file currently processing
 
11
FILENAME                # Name of file currently processing
 
12
FNR                     # Number of records in current files
 
13
NR                      # Number of Lines currently processed
 
14
NF                      # Number of Words in current Line
 
15
 
 
16
ENVIRON                 # Array that contains evrimoment ( ENVIRON["HOME"] )
 
17
ERNO                    # String Describing Last Error
 
18
 
 
19
RLENGTH                 # Length of the substring matched by "match" function
 
20
RSTART                  # Start-Index of the substring matched by "match"
 
21
 
 
22
################################# Separators ##################################
 
23
RS                      # Must contain Lines Separator ( Default "\n" )
 
24
                        #    "" Means some empty lines
 
25
                        #    RegExp can be used 
 
26
RT                      # Text in the Input matched RS ( actualy needed if
 
27
                        # "RS" RegExp )
 
28
FS                      # String Separator ( Default " " )
 
29
                        #     "" Means each character separately
 
30
                        #     if RS="" then newline characters always acts as
 
31
                        #       word separators
 
32
                        # WARNING: If you change this virable no stripping
 
33
                        # leading & trailing will apear.
 
34
                        # But It automaticaly done when $0 recalculated
 
35
                        # for example you may write $(NR+1)="" to avoid
 
36
                        # this problem
 
37
FIELDWIDTHS = "a b ..." # Set this virable if dont want use Word Separators
 
38
                        # but want fixed word size, here "a" size of 1 word
 
39
                        # "b" size of 2 word & etc...
 
40
OFS                     # Separator for print items: print a,b --> a"OFS"b
 
41
ORS                     # Separator for prints: print a; print b --> a"ORS"b
 
42
OFMT                    # flags for printing numbers by print ( equal C printf )
 
43
CONVFMT                 # equal for OFMT but for internal use ( calculatings )
 
44
SUBSEP                  # Array subscripts separator ( Default: \034 )
 
45