Author

Topic: Remotely uploading and executing Bash scripts (BAMT) (Read 1463 times)

sr. member
Activity: 437
Merit: 250
Well I found out the problem. I was using notepad++ which although doesn't do the spaces like a default windows notepad does still does the line return windows way (with default settings). Basically it worked for bamt.conf and pools file but no other files. I guess bamt must ignore the carrier returns. So if you use notepad plus you can "Edit: EOL Conversion: Unix format" and resave and it worked
vip
Activity: 756
Merit: 503
To transfer a file via SSH use scp.

http://manpages.ubuntu.com/manpages/lucid/man1/scp.1.html

If you want to transfer file "test1.txt" in home folder of user1 at computer1(you can put IP address here) to current folder type:

Code:
$ scp user1@computer1:~/test1.txt .

Notice the dot at the end. It means you want to copy the file in the same folder you are actually doing the command. You can also use a path like ~/folder/AnotherFileName.txt instead.
sr. member
Activity: 262
Merit: 250
"-bash: /bin/updatecg: /bin/bash^M

Don't know anything about BAMT, but

It seems like you have a carrage return in there. So it's trying to run a shell called /bin/bash. Linux files are line feed terminated. Windows uses carriage-return line-feed. Make sure you remove all carriage returns before you execute the file.
sr. member
Activity: 437
Merit: 250
Need some help uploading a bash file from my Windows computer to my BAMT mining rigs.  I really don't know how to use the file transfer thing on ssh so I've been using wget and dropbox as a go between. This works fine for uploading bamt.conf files. But when I upload bash files I get this message on execution "-bash: /bin/updatecg: /bin/bash^M: bad interpreter: No such file or directory" This happens I believe because when I try to edit it with nano the file says converted from dos format. I am using notepad++ on windows and saving it with the unix batch file option but still it must be formatted incorrectly. Can anyone help. All the commands appear to me perfect when viewing in nano. I can copy and paste the commands directly in a new file and the script works fine.
Jump to: