How can write a script/file to run commands to open BitPay in Ubuntu

tsavvy

Well-Known Member
Joined
Nov 13, 2015
Messages
244
Reaction score
31
Location
Johannesburg
I'm trying to get a faster way to open the BitPay wallet on Linux (ubuntu).
It requires me to write this every time in the terminal:

$ cd Desktop
$ cd BitPay-linux
$ ./BitPay

Is there a way to condense this into one script/file that I can run instead?
 
I'm trying to get a faster way to open the BitPay wallet on Linux (ubuntu).
It requires me to write this every time in the terminal:

$ cd Desktop
$ cd BitPay-linux
$ ./BitPay

Is there a way to condense this into one script/file that I can run instead?
Yes, open a text editor or nano/vi in terminal and paste the below. Store the file in your home directory and give it executable permissions (chmod +x <filename>). There are probable fancier codes, but this should get the job done.

#!/bin/bash
cd Desktop/BitPay-linux/
sleep 2
./BitPay &
 
I'm trying to get a faster way to open the BitPay wallet on Linux (ubuntu).
It requires me to write this every time in the terminal:

$ cd Desktop
$ cd BitPay-linux
$ ./BitPay

Is there a way to condense this into one script/file that I can run instead?

Assuming you wanted a one line (from the terminal)

Code:
~/Desktop/BitPay-linux/BitPay

or (assuming this is a bash script or it wasn't executable you could do the below)

Code:
bash ~/Desktop/BitPay-linux/BitPay

Note: if you close the terminal your application will quit
Note: the ~ (tilda) specifies the home directory of the currently logged in user.
Note: if you want to run the process in the background (and keep it alive if you close the terminal) - then append an & (ampersand) sign to the end of the line.

Code:
~/Desktop/BitPay-linux/BitPay &

---

Assuming you wanted a script:

See above post for method - but just paste in the one liner instead and run that. No point in changing dirs and then running the command as it just adds an additional step.
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X