Search Results

Search: Posts Made By: dreamzalive
1,089
Posted By dreamzalive
thanx..... ---------- Post updated at 06:31...
thanx.....

---------- Post updated at 06:31 PM ---------- Previous update was at 01:41 PM ----------

hi itkamaraj...i am new to unix, can you plz explain both the code......
1,089
Posted By dreamzalive
thanx itkamaraj......that was very helpful... ...
thanx itkamaraj......that was very helpful...
but if there are multiple records like..
i/p
field1
field2
field3 field4
<blank row>
field1
field2
field3 field4
<blank row>

o/p...
1,089
Posted By dreamzalive
Getting fields from different line..
input:

field1
field2
field3 field4

output:

"field1";"field2";"field3";"field4"

My input file is shown above and I want output as shown using awk. the length of field3 is fixed so, the...
981
Posted By dreamzalive
to get fields from different line to a single line
input:

field1
field2
field3 field4

output:

"field1";"field2";"field3";"field4"

My input file is shown above and I want output as shown using awk. the length of field3 is fixed so,...
1,936
Posted By dreamzalive
thanx neutronscott.....but if we are equating...
thanx neutronscott.....but if we are equating '!a[$1]++-==0' , its only printing the duplicate value and if we are doing '!a[$1]++==1' it is printing the first occurrence. how is that happening???
1,936
Posted By dreamzalive
awk, array indexing
cat filename|nawk ' { FS="="; if (!a[$1]++ == 0) print $0 } '

can anyone plz explain how does array inexing works,how it is evaluating if (!a[$1]++ == 0)??
Showing results 1 to 6 of 6

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