Search Results

Search: Posts Made By: lokiman
3,402
Posted By lokiman
$0 has 120 charecter length.
$0 has 120 charecter length.

I think this could be the limitation with the '%d'.
Are there any other reasons and alternatives?

Thanks
3,402
Posted By lokiman
This substr() function Iam using inside the 'awk'...
This substr() function Iam using inside the 'awk' script to assign current record position values...
3,402
Posted By lokiman
substr() limitations in "AWK" program..!!!
Is there any limitation for the function substr()
Iam trying to assign some 11 digit number value to variable. And printing the variable. This is printing invalid values.
...
2,177
Posted By lokiman
The problem was identified by my colegue. It...
The problem was identified by my colegue.

It is cur_val=substr($0,1,1);

instead of earlier: cur_val=substr($0,5,2);

Sorry for the pain... Thanks a lot
2,177
Posted By lokiman
problem not with 'nawk'
It is not the problem with awk or nawk.
Problems are:

Below printf functions are not printing the result.

printf "Current Zero: %d\n",cur_zero
printf "Current Nine: %d\n",cur_nine

Below...
2,177
Posted By lokiman
'awk' syntax error
Due to some syntax error, my below code is not working.

#!/usr/bin/ksh

nawk '
BEGIN {
cur_val=0; cur_zero=0; cur_nine=0;
sum_zero=0; sum_nine=0;
}
...
1,867
Posted By lokiman
reading awk variable values from outside
One important requirement. I want to read the variable values which are declared inside the 'awk' script from the outside.

pls consider the below script:

#!/usr/bin/ksh

nawk '
BEGIN{...
1,867
Posted By lokiman
Marvelous Genius
Thanks a crore Genius,

Also special thanks for your interest on such a fresher like us.

With Regards / Lokiman
1,867
Posted By lokiman
outfile.txt should be: H0000000000001 ...
outfile.txt should be:

H0000000000001 ##Header
9abc20gfhxyzer
0mnw10dcspreer
9lst70axrstrqw
9lkd20trqeretr
0dre60abcwerip
0ter20kdjjfkjk
9abc20gfhxyzer
0mnw10dcspreer
9lst70axrstrqw...
1,867
Posted By lokiman
Problem while creating "trailer"
I've 3 data files as below,
In each file first line-first letter 'H' indicates the header,
'0' and '9' indicates the data record in which 0 for credit and 9 for debit.
Also from the position 5-6...
5,480
Posted By lokiman
oh...
Oh, unfortunately Iam using "ksh" on solaris !!!
5,480
Posted By lokiman
not completely
Yes, but not completely.

Script should abort if any one file doesn't have 'read' permission.
How to do this? :confused:

Thanks
5,480
Posted By lokiman
One challenging question here
Thanks Radoulov,

Iam using your below script:

nawk 'f[FILENAME] == 1 && !/^\*TM\*/
/^\*TM\*/ { f[FILENAME]++ }
' $(printf "FTPIN/%s\n" $(<FILES/list_file)) > FTPOUT/complete.txt

One more...
6,067
Posted By lokiman
Awk - to test multiple files "read" permission ?
Hi Masters,

Iam new to this Forum and this is my first post.

My question is:

I've some datafiles belongs the type (A, B, C) in the location 'export/home/lokiman '

dataA1.txt
dataB28.txt...
Showing results 1 to 14 of 14

 
All times are GMT -4. The time now is 07:08 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy