Hi.. i am running nawk scripts on solaris system to get records of file1 not in file2 and find duplicate records in a while with the following scripts -compare
duplicate -
in the middle of script I get an error message saying nawk: out of space in tostring on record 971360... I am using a file having 2 million records. Please suggest.. It is very very important...
I searched and came to know that gawk can solve this, but it won't run on Solaris..
Last edited by Scrutinizer; 02-17-2014 at 11:57 AM..
Reason: copied wrong code; mod: spelling
How are ya,
Heres the problem.
I have a line of data that can either be in this format.
"20" or
"20kg"
for the 20kg one i need to be able to read that their is kg on the end of this field and then ignore it and move on to the next line. Can anyone help.
Cheers (3 Replies)
i'm new to shell scripting and have a problem please help me
in the script i have a nawk block which has a variable count
nawk{
.
.
.
count=count+1
print count
}
now i want to access the value of the count variable outside the awk block,like..
s=`expr count / m`
(m is... (5 Replies)
help out with code. two files aaa bbb contains some records..output file xyz should be like this..see below
i/p file:aaa
08350|60521|0000|505|0000|1555|000|NYCMT|Pd_1 |-11878
i/p file: bbb
60521|60510
o/p file :xyz
60510|08350|60521|0000|505|0000|1555|000|NYCMT|Pd_1 |-11878 (5 Replies)
HI,
My file contains data something like
034500,5,B5004946544EB185,DEFAULT,0
Now i want to do a pettern match for DEFAULT and remove that particular line from file and transfer the rest contents to temp file.But my req is i want to do case insensitive matching ie DEFAULT / default.
I... (4 Replies)
Hi,
Could you please tell me how nawk command works when there is a asterisk <*> or space with asterisk < *> or <* > in the parameter.
I am just trying to read line by line and fetch fourth parameter separated by delimiter (|).
But if there is a * or < *> or <* > in the fourth parameter it... (7 Replies)
I am trying to redirect record to two files using nawk if-else.
#Identify good and bad records and redirect records using if-then-else
nawk -F"|" '{if(NF!=14){printf("%s\n",$0) >> "$fn"_bad_data}else{printf("%s\n",$0) >> $fn}}' "$fn".orig
"$fn".orig is the source file name
bad... (7 Replies)
nawk '{ fmt="%3s %22s %48s %35s %21s\n"; if ($3==$6 && $1=="STOPLOSS") { tpy="Successful Match"; jnme=$1; sts="File will be loaded"; cntrl=$3; audit=$6; printf (fmt, tpy,jnme,sts,cntrl,audit) >> "'${AUDIT_DATA_FILE}/${AUDIT36}'" }else if ($3!=$6 && $1=="STOPLOSS") { tpy="Mis-Match ";... (4 Replies)
Discussion started by: wawa
4 Replies
LEARN ABOUT SUNOS
ucblinks
ucblinks(1B) SunOS/BSD Compatibility Package Commands ucblinks(1B)NAME
ucblinks - adds /dev entries to give SunOS 4.x compatible names to SunOS 5.x devices
SYNOPSIS
/usr/ucb/ucblinks [-e rulebase] [-r rootdir]
DESCRIPTION
ucblinks creates symbolic links under the /dev directory for devices whose SunOS 5.x names differ from their SunOS 4.x names. Where possi-
ble, these symbolic links point to the device's SunOS 5.x name rather than to the actual /devices entry.
ucblinks does not remove unneeded compatibility links; these must be removed by hand.
ucblinks should be called each time the system is reconfiguration-booted, after any new SunOS 5.x links that are needed have been created,
since the reconfiguration may have resulted in more compatibility names being needed.
In releases prior to SunOS 5.4, ucblinks used a nawk rule-base to construct the SunOS 4.x compatible names. ucblinks no longer uses nawk
for the default operation, although nawk rule-bases can still be specifed with the -e option. The nawk rule-base equivalent to the SunOS
5.4 default operation can be found in /usr/ucblib/ucblinks.awk.
OPTIONS -e rulebase Specify rulebase as the file containing nawk(1) pattern-action statements.
-r rootdir Specify rootdir as the directory under which dev and devices will be found, rather than the standard root directory /.
FILES
/usr/ucblib/ucblinks.awk sample rule-base for compatibility links
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWscpu |
+-----------------------------+-----------------------------+
SEE ALSO devlinks(1M), disks(1M), ports(1M), tapes(1M), attributes(5)SunOS 5.10 13 Apr 1994 ucblinks(1B)