sed and perl regexps are more or less similar, but surely not identical. So if you were unsure, you should read the man page.
From the other hand do not use grep|awk|sed (or similar) chains because it can be solved with one of them, for example with a single awk script. The regexps in awk are also slightly different.
Code:
awk -F/ ' /casperserver/ { gsub(".commands:#?", $4); print $4 } ' /var/ftp/*.commands
will do almost the same (not tested, just copied)
_____________________________________
If someone helps you, or you approve of what's posted, click the "Add to Reputation" button, on the left of the post.
Happy with solution ... mark as
SOLVED
(located in the "thread tools")