[NTLUG:Discuss] Command not found
Chris Cox
cjcox at acm.org
Thu Jan 25 17:20:15 CST 2007
Chris Cox wrote:
> Tom Tumelty wrote:
>>On 1/25/07, Chris Cox <cjcox at acm.org> wrote:
>>>Tom Tumelty wrote:
>>>>I am running Slackware 10.2 and 2 errors appeared :
>>>>
>>>>-bash: PATH: command not found
>>>>-bash: ANT_HOME: command not found
>>>>
> ... snippity...
>>
>>Thanks for the suggestion but that does not seem to be the problem.
>>Would it help to post part or all of /etc/profile ?
>>
>>I have looked for .bashrc , .bashprofile , /etc/bashrc and found none of
>>these files.
>>I thought each home directory would have a .bashrc file in it but i do not
>>find that file anywhere on the system.
>
> Time to go hunting...
>
> # cd /etc
> # find . -type f -print0 |
> xargs -0 file |
> grep -i text |
> cut -f1 -d: |
> tr '\012' '\000' |
> xargs -0 grep ANT_HOME
A fix for files with colons...
find . -type f -print0 |
xargs -0 file |
grep -i text |
sed 's/:\([^ ]\)/\o002\1/g' |
cut -f1 -d: |
tr '\012\002' '\000:' |
xargs -0 grep ANT_HOME
(Assumes filenames do not contain a ^B character.. unlikely)
>
> (that mess simply does a grep through all of the text files...
> works for most files except those with colons in their names...
> obviously there are other simpler ways... but not as robust...)
>
> If you have the patience, you can try that mess on a higher level
> directory. Might get too many matches though.
>
> It's possible that the variables are being pulled in from /etc/profile.d/* if
> slackware implements such.
>
More information about the Discuss
mailing list