Originally posted by: Wouter Liefting
Various options. Here's one:
sed 's/^ftp /#ftp /' /etc/inetd.conf > /etc/inetd.conf.new && rm /etc/inetd.conf && mv /etc/inetd.conf.new /etc/inetd.conf
Perl inline editing makes it easier but the regex is the same.
perl -pi -e 's/^ftp /#ftp /' /etc/inetd.conf
But both of these are not really recommended. There is a chinet command specifically for this. I don't have an AIX machine to hand so I can't give you the exact syntax, but try a smitty chinet, and use F6 to see what command is being run.