2008-01-14 14:43:06 running shell scripts for BF537 stamp board
ketan bhardwaj (INDIA)
Message: 49563 Hello all,
I am not able to figure out how to run shell scripts on uClinux ported on BF537 stamp board.
If anybody has any clue please reply.
The script I am trying to run is:
#! /bin
ftp 192.168.1.7
test2
testmyo2
get test.txt
!
BTW are there any loops available for shell scripting lke while ,for etc.
What exactly is the process to get a script running from a local directory in uClinux.
QuoteReplyEditDelete
2008-01-14 15:28:20 Re: running shell scripts for BF537 stamp board
Bill Fassler (UNITED STATES)
Message: 49564 try:
#!/bin/sh
and then make sure you have privileges to execute the thing
(chmod 777 your_script.sh)
and then execute:
./your_script
Hope this helps
QuoteReplyEditDelete
2008-01-14 20:31:31 Re: running shell scripts for BF537 stamp board
Robin Getz (UNITED STATES)
Message: 49568 Ketan:
That shell script will not work on a desktop - why would you expect to have it work on a Blackfin?
you can not use an interactive application (ftp) in a shell script.
If you want to grab a file, use wget - which is non-interactive.
-Robin
QuoteReplyEditDelete
2008-01-14 22:38:03 Re: running shell scripts for BF537 stamp board
ketan bhardwaj (INDIA)
Message: 49574 Thanks Bill.
I have tried what you have mentioned and all other variants also....like #!/bin/sh , #!/sbin/sh etc.
Robin thanks for your response.
I will try that wget thing and from the docs about wget I think it will do what i am trying to achieve.
ketan
QuoteReplyEditDelete
2008-01-16 17:20:51 Re: running shell scripts for BF537 stamp board
Bill Fassler (UNITED STATES)
Message: 49694 Ketan,
I just checked one of my scripts and it actually has #!/bin/bash but I think it should work either way, some interactive commands/applications have switches that you can pass in so that they don't interact and will work in scripts. i2cdetect for example usually prompts the user, but if you pass it a -y it won't do that and will work in a script.
As Robin said and I didn't even notice, I don't think any amount of finesse is going to get FTP to work in a script.
Bill
QuoteReplyEditDelete
2008-01-16 23:15:34 Re: running shell scripts for BF537 stamp board
ketan bhardwaj (INDIA)
Message: 49705 about the interactuive commands, i was wrong and anyways wget allows me to do the thing i needed to do .
its just that i am not able to run scripts. may be because it is due to what you have mentioned.
I am not an expert at scripting, just started so sorry if I make a silly mistake.
I will try that out and will tell you all the feedback.
thanks
QuoteReplyEditDelete
2008-01-18 07:39:09 Re: running shell scripts for BF537 stamp board
ketan bhardwaj (INDIA)
Message: 49800
Thanks
I got my script working fine!
will be back with more doubts!