Pipe into while loops
This commit is contained in:
@@ -3,14 +3,13 @@ set -eo pipefail
|
||||
|
||||
# You can now add delay line to pubkey.txt file
|
||||
source pubkey.txt
|
||||
assetchain_args=`./listassetchainparams`
|
||||
overide_args="$@"
|
||||
seed_ip=`getent hosts zero.kolo.supernet.org | awk '{ print $1 }'`
|
||||
komodo_binary='./komodod'
|
||||
|
||||
if [ -z "$delay" ]; then delay=20; fi
|
||||
|
||||
while read args; do
|
||||
./listassetchainparams | while read args; do
|
||||
gen=""
|
||||
if [ $[RANDOM % 10] == 1 ]; then
|
||||
gen=" -gen"
|
||||
@@ -18,4 +17,4 @@ while read args; do
|
||||
|
||||
$komodo_binary $gen $args $overide_args -pubkey=$pubkey -addnode=$seed_ip &
|
||||
sleep $delay
|
||||
done <<< "$assetchain_args"
|
||||
done
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
assetchains=`./listassetchains`
|
||||
komodo_cli='./komodo-cli'
|
||||
|
||||
while read chain; do
|
||||
./listassetchains | while read chain; do
|
||||
$komodo_cli --ac_name=$chain stop
|
||||
done <<< "$assetchains"
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user