Search Results

Search: Posts Made By: stomp
Forum: Shell Programming and Scripting 2 Weeks Ago
1,986
Posted By stomp
Hello psy, as you saw in the last post from...
Hello psy,

as you saw in the last post from Chubler and me, that we have different views on what is the preferred choice of coding. I hope this causes not too much confusion for you.

Global And...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,986
Posted By stomp
It's nearly the same code as yours: If $used_net...
It's nearly the same code as yours: If $used_net is "testnet" set btcopts to "-testnet" otherwise set to empty value. A shorthand if-construct.

The return value of a variable assignment is always...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,986
Posted By stomp
Your code is correct and works here as you...
Your code is correct and works here as you described it should. So I assume the variable $used_net never is set to the correct "testnet" value.

Check the variable value directly before the shown...
Forum: Cybersecurity 3 Weeks Ago
677
Posted By stomp
It maybe fail2ban is configured properly, up and...
It maybe fail2ban is configured properly, up and running. That will definitely explain a rate below average. But f2b can be running without being configured to do blocking at all or not correctly...
Forum: Cybersecurity 3 Weeks Ago
677
Posted By stomp
Same from receiving side. I also only just had a...
Same from receiving side. I also only just had a very quick read on your post.

Instead of one car crashing into a wall two cars crashing frontal into each other with the same speed do square...
Forum: Cybersecurity 3 Weeks Ago
677
Posted By stomp
@Neo: Thanks for rephrasing and clarifying your...
@Neo: Thanks for rephrasing and clarifying your request!

Here's a script which calculates the FLAPM value:


#!/bin/bash

exit_with_message() { echo "$*" ; exit 1 ;}

type lastb >/dev/null...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,986
Posted By stomp
bitcoin-cli -testnet sendmany ""...
bitcoin-cli -testnet sendmany "" "{\"n1yswZYByRv3okGDHs1oDaevq8gsDaYZzC\":"0.079319635", \"2NFafKRugHFdYEib7xVfkT6bvtkUKK8oShZ\":"0.079319635"}" 6 "Payments" "[\"n1yswZYByRv3okGDHs1oDaevq8gsDaYZzC\",...
Forum: Shell Programming and Scripting 3 Weeks Ago
1,986
Posted By stomp
Hello Psy, I suggest for now to only check...
Hello Psy,

I suggest for now to only check if the JSON you want to generate is ok and only after having this 100% correct then go on to build the complete program call.

Regarding the...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
A short comment on debugging: To check if a...
A short comment on debugging:

To check if a function does what it should do, the easiest method is to simply put the function in a small extra program, call it with some valid test data and just...
895
Posted By stomp
tar (child): compress: Cannot exec: No such file...
tar (child): compress: Cannot exec: No such file or directory

As the slightly irritating message states: the compress utility is not found. You have to install it.

In Ubuntu the corresponding...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
The mentioned line is the trickiest thing of all....
The mentioned line is the trickiest thing of all.

You need to know what that eval is actually for. Eval adds an additional evaluation round(so I get from content of $i which may be the number "3"...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
My code is tested and works. But don't rely on...
My code is tested and works. But don't rely on that. Think/Learn how to know and test if the code is working correctly.

The error is that the call of your program is somehow wrong or not like the...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
This thread needs way more time and energy than...
This thread needs way more time and energy than I'm willing to give. I'm out.
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
Correct Usage of quoting ;-)
Hello Psy,


Please don't full quote forum posts. Please only quote the short passage of text you're relating to. Refrain from full quoting because it adds redundant information and makes the...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
Just use the function with the same var as in...
Just use the function with the same var as in your code:


mk_json... "$var" "${addr_arr[@]}"



That doesn't work. Single quotes do not execute variable substitution. You need double quotes...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
@psysc0rpi0n...
@psysc0rpi0n (https://www.unix.com/member_modal.php?u=302183235&modal=1) Great! You did it! Your code is good.

One of my goal in programming is trying to create code which is readable well. So I...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
Notes: maybe you can spare the escaping...
Notes:

maybe you can spare the escaping of " if you mix ' (single quotes) and " (double quotes).
simple shell scripting will suffice for what you want to achieve, jq seems not necessary(but...
Forum: Shell Programming and Scripting 4 Weeks Ago
1,986
Posted By stomp
For simple JSON tasks jq is a versatile tool for...
For simple JSON tasks jq is a versatile tool for querying, manipulating and creating JSON within a Shell script. You'll find a lot of usage examples in the web and of course in the excellent jq...
1,557
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)...
1,557
Posted By stomp
Hi SDohmen, nice to hear that you worked...
Hi SDohmen,

nice to hear that you worked your way through and thanks for giving feedback.

Some comments:



That's why I pointed out XPath for you twice and presented you links for a good...
1,271
Posted By stomp
Hi Mohtashims, I'm now sitting on my...
Hi Mohtashims,

I'm now sitting on my notebook and I checked the two different Debug-Outputs of the 2 ssh connections. I clearly see differences.

I assume, you have - as I suggested - to debug...
1,271
Posted By stomp
Check the log of the ssh server and increase log...
Check the log of the ssh server and increase log level of the ssh server before that to DEBUG/DEBUG2.

I'm sorry I didn't read the ssh debug output. It's difficult to read on my very small mobile...
789
Posted By stomp
Your read statement is out of the loop. So it's...
Your read statement is out of the loop. So it's stuck infinitely, because $url never changes.

One suggestion:


while : ; do
read url
[ "$url" == exit ] && break
wget ...
done
Forum: What is on Your Mind? 09-13-2019
1,068
Posted By stomp
Thanks a lot!
Thanks a lot!
1,557
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...
Showing results 1 to 25 of 386

 

Featured Tech Videos

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