Search Results

Search: Posts Made By: gameboy87
Forum: Programming 06-12-2012
1,993
Posted By Corona688
You cannot strcat a character. You strcat entire...
You cannot strcat a character. You strcat entire strings. That will cause a segmentation fault.

So use fgets instead of fgetc there.

Also: What code gets run here depends on the content of...
2,244
Posted By bartus11
Did you try solution that I provided in your...
Did you try solution that I provided in your previous thread (https://www.unix.com/shell-programming-scripting/157884-need-help-sed-perl.html)?
I just changed "a" to "\t":perl -F'"' -anle 'for...
1,239
Posted By agn
$ cat buf Vivek 50 Ram 34 Hulk 45 Vivek...
$ cat buf
Vivek 50
Ram 34
Hulk 45
Vivek 23
Ram 23
Vivek 55
$ perl -anle '$x{$F[0]}+=$F[1]; END { foreach (keys %x) { print "$_ $x{$_}" } }' buf
Ram 57
Hulk 45
Vivek 128
20,230
Posted By guruprasadpr
Hi First time, when the file is processed, it...
Hi
First time, when the file is processed, it takes the count of 1st column duplicates. Second time, when it is processed, it starts printing those lines which has count more than 1.

btw,...
Showing results 1 to 4 of 4

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