problem:
output is not consistent as expected using external command in AWK
description:
I'm trying to convert $2 into a base64 string for later decoding, and for this when I use [g]awk , I'm getting overlapped results , or say it results are not 100% correct.
my code is:
and the output is given below, not all lines are encoded using base64.
I need to install the base64 encryption method on a UNIX machine under AIX5.2.
I've received a tar file but it is only C source , can you help me please. (sending me a binary base64 or to compile my source)
Thanks by advance (3 Replies)
I am porting a awk script from Windows to unix
I_SALE_MEDIA=$67
if ((I_VOID_FLAG == "Y") && (I_SALE_MEDIA == 0))
NOW consider the case where I_SALE_MEDIA i.e $67 is "000"
The above comparison works fine in Windows , but to make it work in
Unix , I had to change the above as follows :
... (3 Replies)
Hi there,
I have a doubt about how to set this up. This is the situation.
I have two files, one that is ~31,000 in length and has the following information (7 fields):
file1
1 + 100208127 100261594 6 100208127,100231680,100237404,100245177,100249508,100260529, ... (35 Replies)
How can I use awk command to convert values to currency. For example I have a database like follows
John:200
smith:300
kim:405
and want it to out put like this
John $200.00 (3 Replies)
Hi Everyone,
I am confused with the output of the input file and I am using below command in script to get the expected output.
Also I want to add another condition using logical AND (&&) in place of $2=="L"{$4=0-$4} as $2=="L" && $3=="L" {$4=0-$4} but I am getting some awk error.
Can someone... (6 Replies)
And is there a good way of taking them out?
I've been playing around a bit with using b64 to embed images in HTML (and trying to stay within the spec). I've noticed that with openssl's base64 encoder, the output files have newline characters @ every 65th column or so. This renders them useless,... (2 Replies)
Hi everyone
I am very new at awk and to me the task I need to get done is very very challenging... Nevertheless, after admiring how fast and elegant issues are being solved here I am sure this is my best chance.
I have a 2D data file (input file is a plain tab-delimited text file). The first... (1 Reply)
I'm using CentOS 6.3 and I use a crontab entries like this:
0 23 2-31 * 1-6 root weekdayscript
0 23 1 * 7 root weekendscript
this 2 entries always overlaps... but I don't know how... :wall:
thanks (10 Replies)
Hello friends, could you help me about problem with my data lines. I suppose a simple awk code may help me.
I have following data lines: (first line including 3 numbers and then a matrices of 4x10)
500 40 9
1 A B 4 5 6 7 8 9 10
11 12 13 14 15 16 17 18 19 20
21 22... (6 Replies)
I am running into conversion of string to numbers in awk that I can't understand and don't know how to deal with properly
My script checks for numeric only field, I use this approach to do that:
$1 + 0 == $1 It works most of the time, but in some cases it does not behave how I expect it to... (5 Replies)
Discussion started by: migurus
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)