Summary: sed question

From: George Monappallil <George.Monappallil_at_newsedge.com>
Date: Tue Jun 19 2001 - 13:30:00 EDT
Thanks for all those who replied to my email. The general consensus was that
I have to change the write permissions on the directory that I was writing
into. I changed the permissions on the directory to 777 (temp tho) and was
able to write onto that directory. Sendmail was trying to write to that
directory as 'daemon' and that is why it was not able to write to it. I did
have to edit the script a bit to
sed '1,/^$/d' > /opt/home/aliasuser/aliases-users
The -n argument was creating a file but the file was empty. Many thanks
again to all those who answered.

George Monappallil

>  -----Original Message-----
> From: 	George Monappallil  
> Sent:	Monday, June 18, 2001 11:37 AM
> To:	'isp-solaris@isp-solaris.com'; 'sunmanagers@sunmanagers.org'
> Subject:	sed question
> 
> Hi guys:
> please excuse me if this is an offtopic question, but any help would be
> appreciated.
> I am trying to copy a file (aliases-users) from Unix box A to Unix box B.
> I am trying to do it via email. On unix box B, I have an alias set up in
> the /etc/mail/aliases file as
> aliastest: |/opt/home/aliasuser/aliasuser.sh
> 
> The email that comes through is piped through the filecopy.sh script.
> Filecopy.sh contains the following script
> sed -n '1,/^$/d' > /opt/home/aliasuser/aliases-users
> 
> This script just deletes the header information of the email and saves it
> to a new file. The problem is that when the email is piped through this
> program it is giving me the following error (in a mail bounceback)
>    ----- The following addresses had permanent fatal errors -----
> |/opt/home/aliasuser/aliasuser.sh
>     (expanded from: <aliastest@usermail1.newsedge.com>)
> 
>    ----- Transcript of session follows -----
> /opt/home/aliasuser/aliasuser.sh: /opt/home/aliasuser/aliases-users:
> cannot create
> 554 |/opt/home/aliasuser/aliasuser.sh... unknown mailer error 1
> 
> 
> However if I just append to a file that has been 'touched' before(sed -n
> '1,/^$/d' >> /opt/home/aliasuser/aliases-users) it works fine.
> 
> Does any of know how to make this thing to work? Thanks in advance.
> 
> George
> 
Received on Tue Jun 19 18:30:00 2001

This archive was generated by hypermail 2.1.8 : Wed Mar 23 2016 - 16:24:57 EDT