[Bug 4135] Error running some shell scripts directly

bugzilla at busybox.net bugzilla at busybox.net
Mon Sep 12 05:18:29 UTC 2011


https://bugs.busybox.net/show_bug.cgi?id=4135

--- Comment #2 from jabba.nalhutta at gmail.com  ---
I can reproduce it very easily. Perhaps you're not running busybox as the shell
and/or default interpreter. Here is a screenshot with me trying to run two
scripts, "foo.sh" and "bar" (see below):

router at Ubuntu ~/busybox-1.19.2
$ ./ash


BusyBox v1.19.2 (2011-09-10 06:29:23 BST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

router at Ubuntu ~/busybox-1.19.2
$ help
Built-in commands:
------------------
    . : [ [[ alias bg break cd chdir continue echo eval exec exit
    export false fg hash help jobs kill let local printf pwd read
    readonly return set shift source test times trap true type ulimit
    umask unalias unset wait

router at Ubuntu ~/busybox-1.19.2
$ ./foo.sh
This is foo.sh
calling bar ...
./foo.sh: line 4: ./bar: not found
Back to foo.sh
router at Ubuntu ~/busybox-1.19.2
$ ./bar
./ash: ./bar: not found
router at Ubuntu ~/busybox-1.19.2
$ exit
router at Ubuntu ~/busybox-1.19.2
$ 

----- here are the test scripts (foo.sh) ------
#!./ash
echo "This is foo.sh"
echo "calling bar ..."
./bar
echo "Back to foo.sh"

---- bar ----
echo "This is bar"
echo "Finished running bar"

---- this is is what the output should look like ----
router at Ubuntu ~/busybox-1.19.2
$ ./foo.sh 
This is foo.sh
calling bar ...
This is bar
Finished running bar
Back to foo.sh
router at Ubuntu ~/busybox-1.19.2
$

-- 
Configure bugmail: https://bugs.busybox.net/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


More information about the busybox-cvs mailing list