grep -rl UDĞ1 ./ | xargs sed -i s/UDĞ1/LOVE/g

This commit is contained in:
qo-op 2020-04-29 22:12:17 +02:00
parent 0e76a649bc
commit 3519cb29e9
1 changed files with 11 additions and 11 deletions

22
tip.sh
View File

@ -129,7 +129,7 @@ else
exit 1
fi
printf "You have ${bold}%s UDĞ1${normal} on your Duniter Ğ1 wallet.\n\n" "$balance"
printf "You have ${bold}%s LOVE${normal} on your Duniter Ğ1 wallet.\n\n" "$balance"
if [[ $readable -eq 1 ]]; then sleep 2; fi
printf "Want to show your appreciation of your fellow butts' posts while helping spreading awareness about libre currencies?\n\n"
if [[ $readable -eq 1 ]]; then sleep 3; fi
@ -274,7 +274,7 @@ tx_are_possible=0
while [[ $tx_are_possible -eq 0 ]]
do
printf "How many UDĞ1 do you want to send per each like you gave? (minimum is ${bold}%s UDĞ1${normal}) " "$minimumAmountPerLikeInUD"
printf "How many LOVE do you want to send per each like you gave? (minimum is ${bold}%s LOVE${normal}) " "$minimumAmountPerLikeInUD"
read a
printf "\n"
@ -298,13 +298,13 @@ do
if [[ $has_enough_money -eq 0 ]] ; then
printf "You don't have enough UDĞ1 to send all transactions.\n\n"
printf "You don't have enough LOVE to send all transactions.\n\n"
if [[ $readable -eq 1 ]]; then sleep 1; fi
printf "${bold}%s UDĞ1${normal} are needed.\n\n" "$amountGiven"
printf "${bold}%s LOVE${normal} are needed.\n\n" "$amountGiven"
if [[ $readable -eq 1 ]]; then sleep 1; fi
elif [[ $amountPerLike_is_enough -eq 0 ]] ; then
printf "Minimum amount per like is %s UDĞ1.\n\n" $minimumAmountPerLikeInUD
printf "Minimum amount per like is %s LOVE.\n\n" $minimumAmountPerLikeInUD
if [[ $readable -eq 1 ]]; then sleep 1; fi
fi
@ -312,13 +312,13 @@ do
printf "Try again with a different amount per like.\n\n"
maxAmountPerLike=$(awk -vp=$balance -vq=$totalLikesGiven 'BEGIN{printf "%.2f" ,p / q}')
if [[ $readable -eq 1 ]]; then sleep 1; fi
printf "Maximum amount per like possible: ${bold}%s UDĞ1${normal}\n\n" "$maxAmountPerLike"
printf "Maximum amount per like possible: ${bold}%s LOVE${normal}\n\n" "$maxAmountPerLike"
if [[ $readable -eq 1 ]]; then sleep 1; fi
else
newBalance=$(echo "$balance - $amountGiven" | bc -l)
printf "${bold}%s UDĞ1${normal} will be given.\n\n" "$amountGiven"
printf "${bold}%s LOVE${normal} will be given.\n\n" "$amountGiven"
if [[ $readable -eq 1 ]]; then sleep 1; fi
printf "After sending transactions, your new balance will be ${bold}%s UDĞ1${normal}\n\n" "$newBalance"
printf "After sending transactions, your new balance will be ${bold}%s LOVE${normal}\n\n" "$newBalance"
if [[ $readable -eq 1 ]]; then sleep 1; fi
printf "Press ENTER to continue: " && read
printf "\n"
@ -410,7 +410,7 @@ do
done
newLine+=$(printf "| %s UDĞ1 " "$tipAmount")
newLine+=$(printf "| %s LOVE " "$tipAmount")
newLine+="|\n"
@ -451,7 +451,7 @@ do
#printf '%s\n' "silkaj -af --file ~/.ssb/secret.dunikey tx --output $g1_author --amountUD $tipAmount --comment "Thx for your cool posts on ScuttleButt"
silkaj -p "$duniter_server" -af --file ~/.ssb/secret.dunikey tx --output $g1_author --amountUD $tipAmount --comment "Thx for your cool posts on ScuttleButt" -y 2>/dev/null
printf "\n${bold}%s UDĞ1${normal} sent to %s!\n\n" "$tipAmount" "$author_name"
printf "\n${bold}%s LOVE${normal} sent to %s!\n\n" "$tipAmount" "$author_name"
fi
(( authorNum++ ))
@ -473,7 +473,7 @@ then
fi
fi
printf "\n%s UDĞ1 sent to %s butts!\n\n" "$amountGiven" "${#likesNbPerAuthor[@]}"
printf "\n%s LOVE sent to %s butts!\n\n" "$amountGiven" "${#likesNbPerAuthor[@]}"
# Let's publicly thank everyone!
#echo -e "${tyPosts[$n]}"