I am trying to use an awk command within a ksh script but it is not working - I am able to run from command line with no problem. It does not err out - it just does not produce a file with final count.
Any help would be greatly appreciated. Thanks
Last edited by radoulov; 01-22-2013 at 06:17 PM..
Reason: Marked as solved.
Hi all,
I'm using awk in a .ksh script to split one file by line prefix into different files (up to 4). The files are named after the prefix in the line, and a sequence no.
Is there any way to get the filenames in to variables too? I need _ftpfile1, _ftpfile2, _ftpfile3 and _ftpfile4 which are... (2 Replies)
Using an awk script , i want to store the value of a variable in the main script.
currently sum is getting reset to blank in the main script.
How to modify the below code to get the value of esum in the variable sum of the main script???
sum=`echo "$row" | awk -F"" '{$esum=$5}'`
... (0 Replies)
Hi fellas,
I have a file that contains text something like this
SNAPSHOT snap-021ede4a vol-bc3f89c0 completed 2012-11-19T06:05:26+0000 100% 170495546006 850 Created by CreateImage(i-6adc0515) for ami-977dfafe from vol-bc3f89c0
TAG snapshot snap-021ede4a project PAC
TAG snapshot... (5 Replies)
Hi
Iam running below script in crontab but its not working.
#!/bin/sh
cd /Scripts
/usr/local/bin/expect -f /Scripts/bng_backup.exp /Scripts/data.txt
tar -cf bngbackup.tar bngbackup ;gzip bngbackup.tar
when iam running manually the output file is generating..but bngbackup.tar.gz file... (5 Replies)
Hi all,
I have a requirement to connect DB2 database and do some operations and generate a report through shell script.
Can anyone please tell me how can i connect DB2 from unix shell script?
Thanks in ADV. (2 Replies)
how can i view what variables are stored upon the excution of an awk script.
something equivalent to shell eg. sh -vx "script_file"
many thanks in advance! (1 Reply)
I have a script that looks like this:
for f in LISTDETAIL; do gawk -f script_0113b "$LISTDETAIL";done
It works perfectly, and I can see input on the screen. I have tried to redirect it to a file with the following techniques, but no luck:
for f in LISTDETAIL; do gawk -f script_0113b... (2 Replies)
Hi,
I do have an R script named KO.R. Basically reads thousands of files, whose name has a pattern that differs at a portion of the file name, List.txt.
Row_file1_mile.txt
Row_file2_mile.txt
Row_file3_mile.txt
...
...
Row_file1000_mile.txt
Below is a portion of my Rscript that reads... (4 Replies)
Hi,
I have a quick question on parsing the hour/minute and value from a text file and remove the seconds portion. For example in the below text file:
20:26:01 95.83
20:27:01 96.06
20:28:01 95.99
20:29:01 7.11
20:30:01 5.16
20:31:01 8.27
20:32:02 9.79
20:33:01 11.27
20:34:01 7.83... (2 Replies)
Discussion started by: satishrao
2 Replies
LEARN ABOUT LINUX
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).
Free Software Foundation Nov 3 1999 IGAWK(1)