|
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
|
Re: [PLUG] Bash script problems - no "function" support?
|
brent timothy saner had this to say:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 04/23/10 14:01, Mike Leone wrote:
>
>> So ... what? I have a weird link somewhere? Is the link called "sh"
>> fubarred up? How can I tell?
>
>
> root@houseoftherisingson:~# ls -l `which sh`;ls -l `which bash`
> lrwxrwxrwx 1 root root 4 May 12 2008 /bin/sh -> bash
> - -rwxr-xr-x 1 root root 813912 May 12 2008 /bin/bash
>
> compare to your results of:
>
> # ls -l `which sh`;ls -l `which bash`
AH HA!
$ ls -l `which sh`;ls -l `which bash`
lrwxrwxrwx 1 root root 4 2010-01-20 04:10 /bin/sh -> dash
-rwxr-xr-x 1 root root 702160 2008-05-12 14:33 /bin/bash
> if it points to a wrong place (it's possible mine's a fluke, because
> it's on a VPS and not a "real" install), you can simply fix it by rm'ing
> /bin/sh and ln -s /bin/bash /bin/sh
So my "/bin/sh" is NOT pointing to /bin/bash. Now that I think about it,
I seem to remember hearing that Ubuntu's default shell was now dash ...
So then I re-make the link ...
# ls -l `which sh`;ls -l `which bash`
lrwxrwxrwx 1 root root 9 2010-04-23 15:14 /bin/sh -> /bin/bash
-rwxr-xr-x 1 root root 702160 2008-05-12 14:33 /bin/bash
and ...
$ sh test2.sh
hello world
And now I can go try JP's script again (once I figure out how to strip
out the carriage returns that seem to be in there, from saving it form
my email on a Windows system, and then scping it over to the Linux box ...)
Thanks so much!
___________________________________________________________________________
Philadelphia Linux Users Group -- http://www.phillylinux.org
Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce
General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug
|
|