need help in script

i hav e a script in ksh.

#!/bin/ksh

echo "welcome to the transient script"

ps -aef | grep "pipe" > /temp/file1.txt
uuencode /temp/file1.txt $file1.txt | mail -s "ouptup" mail.me@domain.com << EOM
----------------------------------------------------------------
this script is in directory temp. actually its not able to create a file "file1.txt". i need it to store the values of [ ps -aef | grep "pipe" ].then send it as a attachment to email id

the o/p is

welcome to the transient script
No such file or directory
./trans[6]: /temp/file1.txt: cannot create
/temp/file1.txt: No such file or directory
Null message body; hope that's ok
-----------------------------------------------------------------

plz help me in this

that seem to be a permission problem

could you please check that ?

and please remove the email id from the post :slight_smile: ( if thats a genuine email id, i hope so )

Perhaps you mean /tmp/file1.txt