Search Results

Search: Posts Made By: SDohmen
7,307
Posted By SDohmen
Do you mean like: jq -r <data.json '...
Do you mean like:



jq -r <data.json ' .data[] |
. as $parent |
.products[] |
( ($parent.idpurchaseorder|tostring)+";"+(.idproduct|tostring))'

I tested the above and this works indeed....
7,307
Posted By SDohmen
I did find those links you gave me but they where...
I did find those links you gave me but they where still a bit confusing and i would say limited in what i needed. Too be honest i did not have that much time either as i spend already almost a week...
7,307
Posted By SDohmen
Sorry for the late reply. It took a while and...
Sorry for the late reply. It took a while and help from some friends who have more knowledge also about this subject. He told me the same thing and gave me a short example of what is possible. With...
7,307
Posted By SDohmen
Thank you for the comment. I edited the text to...
Thank you for the comment. I edited the text to have the xml correctly displayed.


I think i know what you mean by selecting the subnodes first but i have no clue how to get the rest filled in. ...
7,307
Posted By SDohmen
Converting XML to CSV
Hello,


For i while i have been using XMLStarlet to convert several XML files to CSV files. So far this always went fine.


Today however i got a new XML format however but i cannot find out...
4,003
Posted By SDohmen
I am not sure what you mean with a large file but...
I am not sure what you mean with a large file but i am running this for several weeks now with files around 150k ish. The complete script with 2x this one in it (1 to remove products that are in the...
4,003
Posted By SDohmen
I have no idea how this is possible. When i tried...
I have no idea how this is possible. When i tried without, it did not work.


Anyhow its a mayor improvement over the old version.
4,003
Posted By SDohmen
I just did this one again and i got it working. I...
I just did this one again and i got it working. I noticed the -F";" was missing so i added that and it worked flawlessly. The complete script runs in about 20 sec now which was more then 7 min first.
4,003
Posted By SDohmen
This sounds very interesting but there are 2...
This sounds very interesting but there are 2 issues.


1. I have to split the files in smaller files (around 5k i guess) which isn't a big deal but a little bit annoying.
2. Since this is running...
4,003
Posted By SDohmen
I actually did but i edited in the post after. :)...
I actually did but i edited in the post after. :)


awk prijslijst_filter.csv lowercase_winnaar.csv 9,51s user 0,13s system 99% cpu 9,647 total
Since the difference between the grep and this...
4,003
Posted By SDohmen
I just tested this and it is even faster ...
I just tested this and it is even faster


grep --color=auto -F -f prijslijst_filter.csv lowercase_winnaar.csv 0,19s user 0,11s system 50% cpu 0,594 total



I believe you mean like this:
...
4,003
Posted By SDohmen
I know it is a really short script and if i am...
I know it is a really short script and if i am not mistaken you even wrote it ;).



I just timed both of them and the results are as follows. It looks like there is alot of improvement using...
4,003
Posted By SDohmen
Bash script search, improve performance with large files
Hello,


For several of our scripts we are using awk to search patterns in files with data from other files. This works almost perfectly except that it takes ages to run on larger files. I am...
6,627
Posted By SDohmen
That would be even easier and i see how i...
That would be even easier and i see how i accidently messed up the code so it only worked with the example. With a seperate file it would be even easier as it only needs editing without touching the...
6,627
Posted By SDohmen
Just as a quick update. I tested all the...
Just as a quick update.

I tested all the ones that you guys posted for which again i am gratefull.

We decided to go with the first one from RudiC because that is the easiest to change if...
6,627
Posted By SDohmen
I will test them out as soon as i can but i did...
I will test them out as soon as i can but i did not get the time for it today. Maybe tonight i will have a couple min to test them. I will get back to this and update the thread asap.
6,627
Posted By SDohmen
Wow, both are awesome. I will test them all 3 and...
Wow, both are awesome. I will test them all 3 and see which is easiest to work with for me. The last one looks very nice but we have to be carefull that there are a exact same number on each line so...
6,627
Posted By SDohmen
That is actually also a very interesting way of...
That is actually also a very interesting way of working with the values. It even means the script could be 1/3 of the size.

I will test this out tomorrow when i have some time.

Thanks again...
6,627
Posted By SDohmen
Interesting line but i am not sure how it would...
Interesting line but i am not sure how it would work. The value 0 and negative cannot happen since they are filtered out already. The other thing is that the values arent in order and the full list...
6,627
Posted By SDohmen
Oops i had the mistype for 13 there. I tried...
Oops i had the mistype for 13 there.

I tried the 2 other lines and so far it looks working. I will add some more to see if its 100% but it looks promising for which i am gratefull.
6,627
Posted By SDohmen
awk if value between x and y
Hello,

I am trying to create a awk (prefered) script that prints a extra value based on a number in one of the other columns.


awk '
BEGIN {FS = OFS = ";"
print...
2,969
Posted By SDohmen
Thank you for that answer. Could you do comment...
Thank you for that answer. Could you do comment on my question if the searched manufacturer name has to be first or does that not matter?
2,969
Posted By SDohmen
I think we have a slight miscommunication here...
I think we have a slight miscommunication here :). All files use ; as delimiter. The linked parts above are just several lines which went through the script he wrote and that gives that output. The...
2,969
Posted By SDohmen
*bump*. After last post i decided to add...
*bump*.

After last post i decided to add some extra cleanup lines in the form of all lower cases etc. However i seemed to find some lines that dont like to work with the comparing.

In the...
2,969
Posted By SDohmen
I am sorry for overlooking that error. The...
I am sorry for overlooking that error. The JAC/DIF code is just a supplier code which get added. I overlooked this when copying over the code.

I tested the change and it works fine but i am...
Showing results 1 to 25 of 57

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