Welcome to Quark Community

Quark is an open source software used mainly as a digital currency that employs multiple cryptographic algorithms, which unlike fiat/national currencies provides the platform for a decentralised monetary system.

Quark was launched in 2013 with the belief that the control of money should not be in the hands of the few, but in the hands of the many. This forum tries to build on that ideology by distributing Quarks in the hands of those that are active in the community. By posting quality articles and contributing to general discussions you will earn Quarks.

Sign up Learn more about Quark
  1. Important!

    Quark protocol has been changed to a POW/POS hybrid. The hard fork will take effect starting with block 4937000 ~ 25 November 2017. By that time make sure you run at least version

    To download the wallet for the latest version go here:

Useful scripts that i am using feel free to grab...

Discussion in 'Project Development' started by dcs, Sep 4, 2014.

  1. dcs

    dcs Quarker

    Since i am a linux user most of the time i find it difficult to remember by heart a lot of commands , so i am trying to make my life easier by using script's and aliases. Also since i am trying different kind of altcoins I am gonna explain 2 scripts that i am using to organize all of them and check my balance and transactions in all altcoins. Even more this is really useful if you're working from ssh as well. You can further implement it or correct them if you find anything you don't like. Also i am not taking any responsibility for whatever YOU do to your pc. (even if the commands are straight forward YOU take full responsibility).
    So, first i assume you have a working wallet and the headless wallet quarkcoind up and working( i am not gonna provide details on how to install those , there are plenty simple guides as well as instructions in the /doc file of the quark repository).Also i assume you have a basic knowledge of linux commands.

    The first script lets name it quark_amount.sh will be for listing the balance of your quarks and the mining hashrate you have.

    Here's the code for quark_amount.sh

    #change the walllet path in order to point to the /src folder of your quark repo
    if [[ -z "$1" ]]; then
        coins=$($wallet_path/quarkcoind getbalance)
        generate=$($wallet_path/quarkcoind getmininginfo | grep generate | awk '{print $3}' | sed 's/,//g' )
        hash=$($wallet_path/quarkcoind getmininginfo | grep hashespersec | awk '{print $3}' | sed 's/,//g' )
        if [ "$generate" == "true" ];then
            echo -n "Quark Amount : " && echo -n $coins && echo -n " -- Mining at " &&  echo -n  $hash && echo " H/sec"
            echo -n "Quark Amount : " && echo -n  $coins && echo " -- Idle"
    elif [ $1 == "list" ]; then
        $wallet_path/quarkcoind listtransactions "*" 99999999999
        $wallet_path/quarkcoind listtransactions "*" 99999999999 | grep "amount" | awk '{print $3}' | sed 's/,//g' |awk '{sum+=$1}END{print "Quark Amount : " sum}'
        $wallet_path/quarkcoind listtransactions "$1"  99999999999 | grep "amount" | awk '{print $3}' | sed 's/,//g' |awk 'BEGIN{sum=0}{sum+=$1}END{print "Quark Amount : " sum}'
    So what the code does is using the quarkcoind commands to get the balance of your wallet ,to get the hashrate if you are mining and listing the transactions.
    Just copy paste it to a new document and save it as quark_amount.sh. Then you make it executable chmod 755 ./quark_amount.sh .
    - Running ./quark_amount.sh with no arguments will list the balance and whether or not you are mining and with what hahsrate.
    - If you give the argument "list" , example "./quark_amount list" it will list all the transactions (up to 99999999999 transactions)
    - if you specify an account name it will list the total amount of quarks of that account example "./quark_amount accountX"

    Now since we have that up and working you want it to work from any path on your system. There are two ways of doing this. Either you provide the path in the $PATH variable, or you create an alias.
    Let's create an alias type in the command prompt.(Use whatever editor you like i'll use gedit)
    gedit ~/.bashrc
    (scroll at the end and type)
    alias quark_amount='/path of your script/quark_amount.sh'
    (save it and close)
    source ~/.bashrc

    Now if you have another coin for example "coinX" do the same but wherever you see quark replace with "coinX"

    The second script sums up all those Quark_amount.sh, coinX_amount.sh , coinX1_amount.sh to one script called coins.sh that gives the balance of every coin you have and if you'r mining with what hashpersec

    /path of quark_amount script/quark_amount.sh
    /path of coinX1_amount script/coinX1_amount.sh
    /path of coinX2_amount script/coinX2_amount.sh

    Again make it executable by chmod 755 ./coins and create an alias in ~/.bashrc
    gedit ~/.bashrc
    (scroll at the end and type)
    alias coins='/path of your coins script/coins.sh'
    (save it and close)
    source ~/.bashrc

    Now type coins and see what happens!!!!
    If you like the idea and want to support donate quarks at QSKM1JAGEEAkQJD8jpQHDfNnDM7kcmyLcV

    P.S I can include those 2 scripts as attachments if it is permitted, post below

    Hope you liked it and sorry for any typos :)
    Last edited: Sep 5, 2014
  2. dcs

    dcs Quarker

    Also since it is something i created a long time ago and i was new to quarkcoind commands there maybe more ways to implement what was described.
    MacDuro likes this.
  3. Mako

    Mako Quark Supporter Staff Member QuarkTalk Custodian

    @dcs, can you try post these under Resources -> Tutorials, I will add now the .sh extension so that you can also upload them in there and also please try to use BBcode whenever possible, like \[CODE\]

    Thank you!
    MacDuro likes this.
  4. Mako

    Mako Quark Supporter Staff Member QuarkTalk Custodian

    just tested it and works fine, thanks!
    dcs and MacDuro like this.
  5. maroulis

    maroulis Quarker

    Works great!!!Thanks!!!
    dcs and MacDuro like this.
  6. dcs

    dcs Quarker

    So i post this under Resources -> Tutorials .Fixed the BBcode and is readable this way and have also included, in a zip folder, the files. Happy coding :)
    P.S If you have anything else that you want to add say so and if there's time , ill try to implement it.
    maroulis likes this.
  7. dcs

    dcs Quarker

    dcs submitted a new resource:

    Useful scripts that i am using feel free to grab... - linux

    Read more about this resource...
    maroulis likes this.
  8. Mako

    Mako Quark Supporter Staff Member QuarkTalk Custodian

    Thanks! Anything you think quarkers may find useful please add in the Resources area! I will edit the title to reflect better for further references.
    maroulis and dcs like this.

Share This Page