Search Results

Search: Posts Made By: Zam_1234
2,332
Posted By RudiC
"Pretty similar" code doesn't necessarily result...
"Pretty similar" code doesn't necessarily result in "identical" behaviour. If OS, shell, and environment are the same, I'd be very surprised if identical loops would NOT execute identically.
If you...
2,220
Posted By Don Cragun
If I understand your file contents (from your two...
If I understand your file contents (from your two examples) and assuming that the 1st field in your input is not always Instr1:, you might want to try this slight modification to RudiC's suggestion:...
2,220
Posted By RudiC
How about awk '/^ *$/ {next} {C[substr ($0, 50,...
How about
awk '/^ *$/ {next} {C[substr ($0, 50, 8)]++} END {for (c in C) printf "%4d Instr1: %s\n", C[c], c}' file
3 Instr1: 00111001
2 Instr1: 10111011
2 Instr1: xxxxxxxx
11 Instr1:...
1,963
Posted By RudiC
Wouldn't this small adaption of Scrutinizer's...
Wouldn't this small adaption of Scrutinizer's suggestion fit the request better?awk '
$2==".bit_wen" {split($3,F,/[[:]/)
T=$2

for (i=F[2]; i>=0; i--) ...
4,526
Posted By Chubler_XL
I posted some code in this thread:...
I posted some code in this thread: https://www.unix.com/shell-programming-and-scripting/249416-data-formatting-csv-file-excel.html, that should directly apply here.

Firstly create a template file...
4,526
Posted By Chubler_XL
Can you show expected output for your sample data.
Can you show expected output for your sample data.
4,954
Posted By MasWag
Hello Zam_1234, How about this? awk...
Hello Zam_1234,
How about this?
awk 'BEGIN{FS=",";RS="\n";OFS=",";ORS="\n";} {for (i=1;i<=8;++i){$(16+i)=$(i+8)*100;}}1' file.csv > newfile.csv
1,849
Posted By derekludwig
Don, Zam, $list[0] is the empty string...
Don, Zam,

$list[0] is the empty string because a space was prepended to $line on line 126.

Zam,

Perhaps a little simplification is needed:
while (<fd_in>) {
s{\s*#.*$}{};
($cpu_id,...
Showing results 1 to 8 of 8

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