Search Results

Search: Posts Made By: mkathi
2,361
Posted By mkathi
Thanks RudiC and Don Cragun. your solutions work...
Thanks RudiC and Don Cragun. your solutions work elegantly. I am still working through how i can write this code differently for my learning purpose and will update this thread once i am ablr to...
2,361
Posted By mkathi
Yes I was getting syntax issues which as you...
Yes I was getting syntax issues which as you mentioned the error I should have posted here but I was trying my code on ideone.com which was not printing where the error is it was not me being lazy.I...
2,361
Posted By mkathi
Nice thanks ,this is a very interesting way to...
Nice thanks ,this is a very interesting way to write code but here is the output I am getting when I execute this code

c1,c2,c3,c4,c5
c1,c2,c3,c4,c5,30,50
10,20,30,40,50,30,50...
2,361
Posted By mkathi
Sum of a column as new column based on header in a script
Hello,

I am trying to store sum of a column as a new column inside a file but have to find the column names dynamically


I/p
c1,c2,c3,c4,c5
10,20,30,40,50
20,30,40,50,60

If i want to...
1,038
Posted By mkathi
Okay i will once again look at it thanks
Okay i will once again look at it thanks
1,038
Posted By mkathi
what's the meaning of : after "c4" in the above...
what's the meaning of : after "c4" in the above code written does this represent start of if condition also
-- ignore this i understood that you are checking if its the first line then add a field...
3,163
Posted By mkathi
Thanks i will have a chance to run this tomorrow...
Thanks i will have a chance to run this tomorrow against a large dataset and i will get back with the results..
note: this script taught me a lot about indexes thanks for that.
3,163
Posted By mkathi
my files reea hude ranging from 10000 rec to...
my files reea hude ranging from 10000 rec to 30000000 but I am going to use one file at time i mean open one file at a time will that still be a issue.
1,038
Posted By mkathi
awk not giving the output expected
Hello,

I am practising awk and decided to compare two columns and print the result of the comparison as third column

i/p data
c1,c2,c3
1,a,b
1,b,b

i am trying to compare the last two...
3,163
Posted By mkathi
Yes I will try command substitution when I reach...
Yes I will try command substitution when I reach to work tomorrow online unix terminals are giving me a hard time.

Thanks for explaining the code after a lot of googling I am at the stage where i...
3,163
Posted By mkathi
Yes thank-you, you are right I should be more...
Yes thank-you, you are right I should be more careful with the cases but the output now is as expected
Also can the last line MCOL="ID,NAME" be parameterized example


mcols=$1
filename=$2...
3,163
Posted By mkathi
hello firstly thanks for the time. Yes this...
hello firstly thanks for the time.

Yes this is exactly what I am looking for but the generated hash values do not match in the above output for example the first row ...
3,163
Posted By mkathi
Hello you are right I have to pass the...
Hello you are right

I have to pass the input as arrays yes and i did make a typo near the echo

yes the echo at the end is outside the loop so it will only print out the last row i think
...
3,163
Posted By mkathi
Hello you are right I have to pass the...
Hello you are right

I have to pass the input as arrays yes and i did make a typo near the echo

yes the echo at the end is outside the loop so it will only print out the last row i think
...
3,163
Posted By mkathi
Shell script to apply functions to multiple columns dynamically
Hello,

I have a requirement to apply hashing algorithm on flat file on one or more columns dynamically based on header

sample input file
ID|NAME|AGE|GENDER
10|ABC|30|M
20|DEF|20|F

say if...
Showing results 1 to 15 of 15

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