Note that to avoid processing newflatfile_Mon-YEAR.csv files if you run this script multiple times, you probably want to just use flatfile* instead of *flatfile* as the filename matching pattern in your script.
Hi
The following code seems to work, but why am i getting an error message?
cscyabl@comet:(develop)> awk 'BEGIN {FS="|"}{print $2 >> $1}' test.sum
awk: A print or getline function must have a file name.
The input line number is 8. The file is test.sum.
The source line number is 1.
... (2 Replies)
I am trying to write a script that prompts users for date and time, then process the gzip file into awk. During the ksh part of the script another file is created and needs to be processed with a different set of pattern matches then I need to combine the two in the end. I'm stuck at the part... (6 Replies)
Im using awk and I want the output filename to contain the first field of the input file.
Ex.
1 dddd wwwww
1 eeeee wwww
1 wwww eerrrr
2 eeee eeeeee
I want the output files to be xxx1 and xxx2
Thank you (4 Replies)
I have a line that works for static filename
cat /directorypath/filename | sed '//d;//d' > filename
This approach when used in a script works well.
Then i need a list of filenames to give this line.
I can get the list into a file by filelist1='ls -m'
then use filelist2=${filelist1##ls... (4 Replies)
Hi Guys,
i have a input file as below
SEL elapsedtime ,StartTime,QueryText
FROM dbc.qry
WHERE StartTime >= '2010-03-24 20:10:08'
AND username ='xxx_yyy_aaa_01'
ORDER BY LastRespTime DESC
The output needed is just "=" which exist before 'xxx_yyy_aaa_01'
... (12 Replies)
Hi,
I have two files , one file with data file with attributes that need to be sent to another file to generate a predefined format.
Example:
File.txt
AP|{SSHA}VEEg42CNCghUnGhCVg==
APVG3|{SSHA}XK|"password"
AP3|{SSHA}XK|"This is test"
....
etc
---------
test.sh has... (1 Reply)
Hi,
I am writing one unix script to get row count of few tables into one sequential file
my script is like this
$ORACLE_HOME/bin/sqlplus -s <<EOF >output.txt
userid/password@databasename
set verify off
set heading off
set feedback off
select count(*) count from tablel where ;
select... (4 Replies)
Hi All,
I'd like to create a specific output filename for AWK.
The file I am processing with AWK looks like:
output_081012.csv*
27*TEXT*1.0*2.0*3.0
where * is my delimeter and the first line of the file is the output filename i'd like to create
is there a way to assign an awk... (10 Replies)
Hi Folks,
I am trying to assign a value from the command to a dynamic variable. But I am not getting the desired output.. I am sure something is wrong so i need experts advise.
There will be multiple files like /var/tmp/server_1, /var/tmp/server_2, /var/tmp/server_3, having different server... (6 Replies)
Today I needed to take a look through a load of large backup files, so I wrote the following line to find them, order them by size, and print the file sizes in GB along with the filename. What happened was odd, the output was all as expected except for the first output line which had the filename... (4 Replies)
Discussion started by: gencon
4 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)