BB Unix Network Monitor - Message
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: {bb} bb-mailq.sh - No such file or directory ???
It didn't sound like you ever opened the file in vi. 'cat', 'more',
'less', and 'file' will not reveal the existence of DOS line
terminators, but vi will. If you ever download a Unix text or shell
script to a DOS machine first, then copy it to a *nix box, always vi
the file to check for DOS CR+LF line terminators (commonly displayed
in vi as ^M). Most *nix hosts have a utility called dos2unix (and
conversely unix2dos) that changes the line termination characters from
DOS to *nix format (unix2dos works the opposite way, as you might
expect). Read the man page on dos2unix to learn how to use it.
For the record, there are a few assumptions that may have been made
here that should be noted. I make no accusations, mind you. These
are mistakes that any person could easily make:
1. Never assume that a script from Deadcat will work "out of the box"
on your BB client/server. Some will need modifications, or even
wholesale changes. Always open the script and try to see what it does
before just putting it onto your host. Deadcat scripts, from what I
can see, have no method other than peer comments to verify security or
efficacy.
2. Never assume that a script from Deadcat is bug free. While the
developers of many of these scripts are dedicated, talented coders,
one rarely finds code more complicated than 'hello world' that is bug
free. If you find a bug in one of the scripts, please note it, fix it
if possible, and send your changes back to the developer for inclusion
into the original script.
3. Never assume that a script from Deadcat is up to date. Many
scripts on Deadcat, while effective, and still useful, are several
years old. They may have been posted by an individual who wrote the
script for a specific job, shared it, but then moved on, and is no
longer working with BB or the script in question. Double check the
dates on the scripts that you download, and the older they are, the
more you need to check them over. An Oracle database monitoring
script written 3 years ago, for example, might still work for an
Oracle 8i db, but not for Oracle 9 or 10.
4. If you find a script that works for you, please comment on
Deadcat. Comments are the best way for script consumers to help the
community, and the developers.
5. If you find a script that is outdated, appears to no longer be
maintained, and you are able to maintain it, contact the Deadcat
maintainers, and ask about policies on taking over an abandoned
script. Or feel free to create a fork and upload your own version to
Deadcat. Just remember to always verify and obey the original
license, and credit any borrowed code in your script.
Hope that helps some folks. I'm not trying to tell folks how to run
their systems, just pass along a few helpful hints that I've learned
in my 2 years of BB administration.
Regards,
Ben Pitzer
On Sun, 29 Aug 2004 15:15:49 -0600, trichard <trichard@hypermall.net> wrote:
> Hi There,
>
> Thanks to all for your help. I finally got it working. What's really
> odd is that the command:
> file bb-mailq.sh
>
> Run on the original file resulted in it saying it was:
> Bourne shell script text executable
>
> However, once I did the following as Adam Goryachev suggested:
>
> echo \#\!/bin/sh > test.sh
> echo echo test >> test.sh
> chmod 755 test.sh
> cat bb-mailq.sh >> test.sh
>
> I went back in later to vi the file I saw ALL the "^M" returns at the
> end of every line! These did NOT appear in the original file and once I
> removed them from the test.sh and renamed the test.sh to bb-mailq.sh
> everything now works...
>
> Thanks for the help. I'm still very confused why the original file
> didn't show these hard returns until I did the "cat". Any idea?
>
> -trichard
--
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=
To unsubscribe from this list, or to subscribe to the bb-digest list
send e-mail to mailto:majordomo@bb4.com with unsubscribe bb -and/or-
subscribe bb-digest in the BODY of the message.
Home |
Main Index |
Thread Index