Regarding overwriting the textfile with output what we get!

Hi freinds,

My problem is I have a script which is used for our office work...

in that with my userid i can append the LOGFILE with the output which i get while running the script..

for this i use the below command

output >> $LOGFILE

but with the same script my colleague is not able to append the LOGFILE.

it is not giving any error but the full output is not going to LOGFILE. only half the part of output is going to LOGFILE.

what can i do to overcome this?

output >> $LOGFILE

the above command is to append to the LOGFILE and not to overwrite (> overwtites the file and >> appends to the file)

yes..sorry that was a error.. I want to append to LOGFILE... now edited.. it is working fine for me n my freind.. but foe one of my colleague full output is not going to LOGFILE..what may be the problem?

Most probably that file is owner by your user, and has permission 644 (or more restrictive) (mode 664 = -rw-r--r-- in ls -l). If he's in the same group as you, add the group writeable bit (chmod g+w). Otherwise you'll have to add the other writeable (chmod o+w), but this is dangerous as it will allow anyone to write to it.

where i should do that pludi? i mean chmod g+w???

If you don't know a command, there is one that can (probably) always help you:

man <command>

In your case, you have 2 options:

chmod g+w /path/to/logfile

or

cd /path/to/
chmod g+w logfile

Thanks Pludi..will try and let you know.. Thanks a lot for your kind reply..

hey brother one more request for you.

I have one more thread to which nobody is giving me the soluton..could you please try and help me?