Modify

Opened 7 years ago

Closed 7 years ago

#4863 closed defect (wontfix)

bash script

Reported by: anonymous Owned by: developers
Priority: normal Milestone:
Component: packages Version:
Keywords: serial, tts, script, bash Cc:

Description

hello,

I have a Linksys wrt54g with kamikaze 8.09
When I try to run a shell script this is the result

root@OpenWrt:/tmp# ./ser.sh
-ash: ./ser.sh: not found

this is the ser.sh

#!/bin/bash
A=microcom -t 1 /dev/tts/0
if [ -n "$A" ] ;
then

echo I received something from the serial port

fi

Thanks

Attachments (0)

Change History (4)

comment:1 follow-up: Changed 7 years ago by anonymous

Which version of Linksys WRT54G?

comment:2 in reply to: ↑ 1 Changed 7 years ago by anonymous

Replying to anonymous:

Which version of Linksys WRT54G?

V3.1

comment:3 Changed 7 years ago by Ian! D. Allen <idallen@…>

There is no /bin/bash in default OpenWrt.
The shells are /bin/sh or /bin/ash
Change #!/bin/bash to #!/bin/sh and make sure
nothing else is on the first line.

comment:4 Changed 7 years ago by florian

  • Resolution set to wontfix
  • Status changed from new to closed

bash could be installed if requiring bash-only scripting and/or functions but this does not seem to be the case so correct your interpreter as suggested.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.