Hello,
I am trying to write a formatted report into a file using .ksh script and awk. Here is the command I am trying to run
echo "before awk" ${SRC_SCHEMA}
echo | awk '{printf "%-20s", ${SRC_SCHEMA} }' >>$REPORT_SQL_NAME
I get the following error
before awk ADW
awk: 0602-562 Field $()... (1 Reply)
Hi Experts,
Can you please help me out for the below scenario,
I have a variable length file with the fixed number of columns, in which the fields are delimited by pipe symbol (|). From that file I have to extract the lines which has the following scenario,
The field1 in a... (1 Reply)
i have a file and i want to print the second variable and add qoutes to it
i do
awk -F"|" '{print $2}' star.unl.
i get the output xxxxxxx
but i need the variable($2) to be in quotes.like
"xxxxxxx"
how do i do there please (3 Replies)
Script is: accept filename as argument(also handle CTRL+C).to check whether th file exist in the current directory,it it then using awk find the employees who are either born in 1990 or drawing a salary greater than 25000.
In my database file 1st field is of id ,2nd field is name,5th field is of... (5 Replies)
Hi,
i have some problems with regular expressions in a awk search pattern.
what i want to do:
i want to calculate the mean-value in the time from 00:00 to 06:00
how my data looks like:
....
04/01/13-01:40 670992 54802 80711 116460 156177
04/01/13-01:50 703725 60150 85498 ... (3 Replies)
Hello there,
I am trying to get my head around the section below of a script we use that incorporates AWK and Regular Expressions.
{ match($0,"The broker*");print $1,$2,$3 ":", substr($0, RSTART,RLENGTH)}
I have a basic understanding of how match works, what I am struggling with is the... (2 Replies)
when I use
Input command | awk '$2~/::/'
300 12:3:0 FC 15 normal 559104 525312 6:6:1* 7:6:1 600
301 12:3:1 FC 15 normal 559104 525312 6:6:1 7:6:1* 600
302 12:3:2 FC 15 normal 559104 524288 6:6:1* 7:6:1 600
303 12:3:3 FC 15... (12 Replies)
Linux 6.X environments (RHEL, Oracle Linux )
I could write basic shell scripts in bash.
In my spare time, I was planning to learn awk or sed to deal with regular expression tasks I have to deal with. But, I gather that python is gaining popularity these days and I came to know that python has a... (5 Replies)
Discussion started by: John K
5 Replies
LEARN ABOUT OPENSOLARIS
igawk
IGAWK(1) Utility Commands IGAWK(1)NAME
igawk - gawk with include files
SYNOPSIS
igawk [ all gawk options ] -f program-file [ -- ] file ...
igawk [ all gawk options ] [ -- ] program-text file ...
DESCRIPTION
Igawk is a simple shell script that adds the ability to have ``include files'' to gawk(1).
AWK programs for igawk are the same as for gawk, except that, in addition, you may have lines like
@include getopt.awk
in your program to include the file getopt.awk from either the current directory or one of the other directories in the search path.
OPTIONS
See gawk(1) for a full description of the AWK language and the options that gawk supports.
EXAMPLES
cat << EOF > test.awk
@include getopt.awk
BEGIN {
while (getopt(ARGC, ARGV, "am:q") != -1)
...
}
EOF
igawk -f test.awk
SEE ALSO gawk(1)
Effective AWK Programming, Edition 1.0, published by the Free Software Foundation, 1995.
AUTHOR
Arnold Robbins (arnold@skeeve.com).
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+--------------------+-----------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+--------------------+-----------------+
|Availability | SUNWgawk |
+--------------------+-----------------+
|Interface Stability | Volatile |
+--------------------+-----------------+
NOTES
Source for gawk is available on http://opensolaris.org.
Free Software Foundation Nov 3 1999 IGAWK(1)