Search Results

Search: Posts Made By: SDohmen
7,295
Posted By stomp
Your json is different from mine. As the error...
Your json is different from mine. As the error message states numbers and strings cannot be added. You have to convert the number to a string before concatenating both:


... (number_var|tostring)...
7,295
Posted By Chubler_XL
SDohmen, I don't generally thank people for...
SDohmen, I don't generally thank people for posting questions.

However you've posted good example data and a clear and concise question with a reasonable attempt at solving it yourself. Also the...
7,295
Posted By stomp
A little help for what you've nearly got...
A little help for what you've nearly got yourself:

xmlstarlet sel -t -m //searchresults/data/products -v "concat(';',idproduct)" -n purchaseorders.xmlThis will give you the ordered products, like...
6,624
Posted By RudiC
Is it? How about a combination of Scrutinizer's...
Is it? How about a combination of Scrutinizer's and my approach? With a definition file like
250 0.06
100 0.07
55 0.08
50 0.1
45 0.12
40 0.13
35 0.15
30 0.17
25 ...
6,624
Posted By Scrutinizer
Try: $1 instead of $13 else if instead...
Try:

$1 instead of $13
else if instead of elseif
create an extra condition for else to print lines that do not match the other criteria, or use a variable.
6,624
Posted By RudiC
Wouldn't . . . TMP = 0.06 if ($14 <...
Wouldn't
.
.
.
TMP = 0.06
if ($14 < 250) TMP = 0.07
if ($14 < 100) TMP = 0.08
if ($14 < 55) TMP = 0.1
if ($14 < 50) TMP = 0.12
if ($14 < 45) TMP = 0.13
if ($14 < 40) TMP = 0.15
if...
2,969
Posted By RudiC
If you look at the script, you see that FS = OFS...
If you look at the script, you see that FS = OFS = ";", and that the respective fields are split($1, T, ",") by commas. ALL comma separated subfields are treated identical and equal, and spaces are...
2,969
Posted By RudiC
How about awk ' BEGIN {FS = OFS =...
How about
awk '
BEGIN {FS = OFS = ";"
print "ean;sku;pps_reference;mpn;stock;price;manufacturer"
}
FNR == 1 {FCNT++
}
FCNT...
3,865
Posted By RudiC
Would this do:awk -F";" '{$1 = sprintf ("%013.f",...
Would this do:awk -F";" '{$1 = sprintf ("%013.f", $1)} /^0/ {print > "padded"} 1' OFS=";" file
0790069375798;94019;DIR-505/E;8;15.12;D-Link;CMT
4039784518926;94045;2.633-002.0;2;13.00;Kärcher;CMT...
7,606
Posted By RudiC
Did you look for two files called "Positive" and...
Did you look for two files called "Positive" and "Negative" in your pwd?
7,606
Posted By RavinderSingh13
Hello SDohmen, You could redirect the output...
Hello SDohmen,

You could redirect the output to a Output_file as follows then.

awk 'FNR==NR{A[$1]=$1;next} ($1 in A){print}' pattern_file FS=";" main_file > Output_file

EDIT: In case you...
2,513
Posted By RudiC
Try awk ' BEGIN {FS = OFS = ";" ...
Try awk '
BEGIN {FS = OFS = ";"
print "ean;sku;pps_reference;mpn;stock;price;manufacturer"
}
{gsub (/ /, "", $1)
}...
2,513
Posted By RudiC
awk ' BEGIN {FS = OFS = ";" ...
awk '
BEGIN {FS = OFS = ";" # set in- and output separator
print "Barcode;..." # print header
}
NR == FNR ...
2,513
Posted By RavinderSingh13
Hello SDohmen, Following may help you in...
Hello SDohmen,

Following may help you in same.

awk '
BEGIN {FS = OFS = ";" ###### Setting...
2,513
Posted By RudiC
awk ' BEGIN {FS = OFS = ";" ...
awk '
BEGIN {FS = OFS = ";"
print "Barcode;Art_ours;Art_Sup;SKU;stock;price;manufacturer"
}
NR == FNR {gsub (/ /, "", $1)
...
2,513
Posted By Skrynesaver
perldoc -f chomp I did mention it was...
perldoc -f chomp


I did mention it was untested
2,513
Posted By RavinderSingh13
Hello SDohmen, I am confuse here by seeing...
Hello SDohmen,

I am confuse here by seeing your sample output, as follows are the comments on same.

Barcode;Art_ours;Art_Sup;SKU;stock;price;manufacturer...
Showing results 1 to 17 of 17

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