mbmaster 26 Share Posted May 6, 2021 Hi Dreambuddy's I try to select a random account, and then start quickstart with this account: #! /bin/bash ## Variables SELECT_FILE="/home/martijn/Desktop/Accounts/Accounts.sh" ## START SELECTING ONE OF THE CHOICES CHOICES=`cat "$SELECT_FILE"` #echo "$CHOICES" CHOSEN=`echo "$CHOICES" | sort -R | sed 1q` echo "$CHOSEN" ## RUN QUICKSTART WITH CHOSEN ACCOUNT java -jar /home/martijn/DreamBot/BotData/client.jar -account "echo "$CHOSEN"" -proxy "Proxy 1" -script "{name}" -params {name} The 'echo "$CHOSEN"' displays the name of the random chosen account in the terminal, but quickstart isn't loading with it. (I have already double checked whether all accounts are in the account manager of Dreambot ). Any ideas? Link to comment Share on other sites More sharing options...
Pandemic 2721 Share Posted May 6, 2021 You don't need to use echo to print that variable, and by doing so you were actually un-quoting, messing up the whole thing. This worked for me (cleaned it up a little bit): #!/bin/bash ## Variables SELECT_FILE="$HOME/Desktop/Accounts/Accounts.sh" ## START SELECTING ONE OF THE CHOICES CHOSEN=$(sort -R < "$SELECT_FILE" | sed 1q) echo "$CHOSEN" ## RUN QUICKSTART WITH CHOSEN ACCOUNT java -jar ~/DreamBot/BotData/client.jar -account "$CHOSEN" -proxy "Proxy 1" -script "{name}" -params {name} Link to comment Share on other sites More sharing options...
mbmaster 26 Author Share Posted May 7, 2021 10 hours ago, Pandemic said: You don't need to use echo to print that variable, and by doing so you were actually un-quoting, messing up the whole thing. This worked for me (cleaned it up a little bit): #!/bin/bash ## Variables SELECT_FILE="$HOME/Desktop/Accounts/Accounts.sh" ## START SELECTING ONE OF THE CHOICES CHOSEN=$(sort -R < "$SELECT_FILE" | sed 1q) echo "$CHOSEN" ## RUN QUICKSTART WITH CHOSEN ACCOUNT java -jar ~/DreamBot/BotData/client.jar -account "$CHOSEN" -proxy "Proxy 1" -script "{name}" -params {name} Hi @Pandemic, Thanks for cleaning up my script a bit . But still this isn't working for me. #!/bin/bash ## Variables SELECT_FILE="$HOME/Desktop/Accounts/Accounts.sh" ## START SELECTING ONE OF THE CHOICES CHOSEN=$(sort -R < "$SELECT_FILE" | sed 1q) echo "$CHOSEN" ## RUN QUICKSTART WITH CHOSEN ACCOUNT java -jar ~/DreamBot/BotData/client.jar -account "$CHOSEN" -proxy "Proxy 1" -script "# Woodcutting" In the terminal you see the echo of the CHOSEN account. But when it runs quickstart, it doesn't load it. Is it possible to load the variable first ($CHOSEN), then run the quickstart command? Because I think with this command the quickstart command is just looking for the account named: $CHOSEN and not filling in the name of the variable $CHOSEN before starting the command. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.