Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Feb 2004 00:32:59 +0100
From:      Mathias Haas <mathias@haas.se>
To:        Julien Gabel <jpeg@thilelli.net>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Shell scripting woes.
Message-ID:  <403BDF2B.8030400@haas.se>
In-Reply-To: <54147.192.168.0.97.1077663694.squirrel@webmail.thilelli.net>
References:  <51804.193.14.163.194.1077641809.squirrel@mail.haas.se><403B9112.1080503@circlesquared.com><52540.192.168.0.97.1077646240.squirrel@webmail.thilelli.net><403B952C.4060706@haas.se> <403BC43B.6030003@infinitebubble.com> <53781.192.168.0.97.1077659656.squirrel@webmail.thilelli.net> <403BD4F8.40101@haas.se> <54147.192.168.0.97.1077663694.squirrel@webmail.thilelli.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Julien Gabel wrote:

>>>The following works fine, here is the detail:
>>>
>>>$ date ; ls -lF /tmp/test.*
>>>Tue Feb 24 22:50:11 CET 2004
>>>-rwxr-x---  1 jgabel  wheel  49 Feb 24 22:50 /tmp/test.bash*
>>>$
>>>$ cat /tmp/test.bash
>>>#!/usr/local/bin/bash
>>>echo start > /tmp/test.txt
>>>$
>>>$ crontab -l
>>>* * * * * /tmp/test.bash
>>>$
>>>$ date ; ls -lF /tmp/test.*
>>>Tue Feb 24 22:51:17 CET 2004
>>>-rwxr-x---  1 jgabel  wheel  49 Feb 24 22:46 /tmp/test.bash*
>>>-rw-r--r--  1 jgabel  wheel   6 Feb 24 22:51 /tmp/test.txt
>>>$
>>>$ cat /tmp/test.txt
>>>start
>>>$
>>>
>>>Can you try *stricly* the same thing?
>>>      
>>>
>
>  
>
>>Sure (this is run as root):
>>$ cd /tmp
>>$ date ; ls -lF /tmp/test.*
>>Tue Feb 24 23:25:56 CET 2004
>>-rwxr-x---  1 root  wheel  45 Feb 24 23:24 /tmp/test.bash*
>>$
>>$ cat test.bash
>>#!/usr/local/bin/bash
>>echo start > test.txt
>>
>>$ crontab -l
>>* * * * * /usr/local/sbin/pure-ftpwho -w > /www/data/ftpstatus.html
>>* * * * * /tmp/test.bash
>>$ date ; ls -lF /tmp/test.*
>>Tue Feb 24 23:26:08 CET 2004
>>-rwxr-x---  1 root  wheel  45 Feb 24 23:24 /tmp/test.bash*
>>$
>>
>>Not much of difference I'm afraid.
>>    
>>
>
>There is a little difference : you are running it as 'root', and
>no explicit path is given for "test.txt" in "test.bash". Can you
>give us the result of :
>
>  # ls -lF ~root/test.txt
>
>  
>
Oh my! What stupidity! Of course. I'm afraid sometimes my DOS-roots are 
revealed...  Thanks!



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?403BDF2B.8030400>